| 赞 | 0  | 
 
| VIP | 0 | 
 
| 好人卡 | 0 | 
 
| 积分 | 1 | 
 
| 经验 | 18354 | 
 
| 最后登录 | 2016-7-19 | 
 
| 在线时间 | 9 小时 | 
 
 
 
 
 
Lv1.梦旅人 
	- 梦石
 - 0 
 
        - 星屑
 - 50 
 
        - 在线时间
 - 9 小时
 
        - 注册时间
 - 2007-12-15
 
        - 帖子
 - 244
 
 
 
 | 
	
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员  
 
x
 
- #==============================================================================
 
 - # ■ Sprite_Battler
 
 - #------------------------------------------------------------------------------
 
 - #  战斗显示用活动块。Game_Battler 类的实例监视、
 
 - # 活动块的状态的监视。
 
 - #==============================================================================
 
  
- class Sprite_Battler < RPG::Sprite
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 定义实例变量
 
 -   #--------------------------------------------------------------------------
 
 -   attr_accessor :battler                  # 战斗者
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 初始化对像
 
 -   #     viewport : 显示端口
 
 -   #     battler  : 战斗者 (Game_Battler)
 
 -   #--------------------------------------------------------------------------
 
 -   def initialize(viewport, battler = nil)
 
 -     super(viewport)
 
 -     @battler = battler
 
 -     @battler_visible = false
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 释放
 
 -   #--------------------------------------------------------------------------
 
 -   def dispose
 
 -     if self.bitmap != nil
 
 -       self.bitmap.dispose
 
 -     end
 
 -     super
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 刷新画面
 
 -   #    增添跳跃功能
 
 -   #--------------------------------------------------------------------------
 
 -   def update
 
 -     super
 
 -     # 战斗者为 nil 的情况下
 
 -     if @battler == nil
 
 -       self.bitmap = nil
 
 -       loop_animation(nil)
 
 -       return
 
 -     end
 
 -     # 文件名和色相与当前情况有差异的情况下
 
 -     if @battler.battler_name != @battler_name or
 
 -        @battler.battler_hue != @battler_hue
 
 -       # 获取、设置位图
 
 -       @battler_name = @battler.battler_name
 
 -       @battler_hue = @battler.battler_hue
 
 -       self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue)
 
 -       @width = bitmap.width
 
 -       @height = bitmap.height
 
 -       self.ox = @width / 2
 
 -       self.oy = @height
 
 -       # 如果是战斗不能或者是隐藏状态就把透明度设置成 0
 
 -       #######如果是战斗不能就更改战斗图片#######
 
 -       if @battler.dead? or @battler.hidden
 
 -          self.bitmap = RPG::Cache.battler(@battler_name +"_d", @battler_hue)
 
 -          @width = bitmap.width
 
 -          @height = bitmap.height
 
 -          self.ox = @width / 2
 
 -          self.oy = @height
 
 -          self.opacity = 255
 
 -        end
 
 -     end
 
 -     # 动画 ID 与当前的情况有差异的情况下
 
 -     if @battler.damage == nil and
 
 -        @battler.state_animation_id != @state_animation_id
 
 -       @state_animation_id = @battler.state_animation_id
 
 -       loop_animation($data_animations[@state_animation_id])
 
 -     end
 
 -     # 应该被显示的角色的情况下
 
 -     if @battler.is_a?(Game_Actor) and @battler_visible
 
 -       # 不是主状态的时候稍稍降低点透明度
 
 -       if $game_temp.battle_main_phase
 
 -         self.opacity += 3 if self.opacity < 255
 
 -       else
 
 -         self.opacity -= 3 if self.opacity > 207
 
 -       end
 
 -     end
 
 -     # 明灭
 
 -     if @battler.blink
 
 -       blink_on
 
 -     else
 
 -       blink_off
 
 -     end
 
 -     # 不可见的情况下
 
 -     unless @battler_visible
 
 -       # 出现
 
 -       if not @battler.hidden and not @battler.dead? and
 
 -          (@battler.damage == nil or @battler.damage_pop)
 
 -         appear
 
 -         @battler_visible = true
 
 -         if @battler.damage == nil and @battler.dead?
 
 -            self.bitmap = RPG::Cache.battler(@battler_name +"_d", @battler_hue)
 
 -            @width = bitmap.width
 
 -            @height = bitmap.height
 
 -            self.ox = @width / 2
 
 -            self.oy = @height
 
 -            self.opacity = 255
 
 -         else           
 
 -         self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue)
 
 -         @width = bitmap.width
 
 -         @height = bitmap.height
 
 -         self.ox = @width / 2
 
 -         self.oy = @height
 
 -         end
 
 -       end
 
 -     end
 
 -     # 可见的情况下
 
 -     if @battler_visible
 
 -       # 逃跑
 
 -       if @battler.hidden
 
 -         $game_system.se_play($data_system.escape_se)
 
 -         escape
 
 -         @battler_visible = false
 
 -       end
 
 -       # 白色闪烁
 
 -       if @battler.white_flash
 
 -         whiten
 
 -         @battler.white_flash = false
 
 -       end
 
 -       # 动画
 
 -       if @battler.animation_id != 0
 
 -         
 
 -         animation = $data_animations[@battler.animation_id]
 
 -         animation(animation, @battler.animation_hit,@battler.damage, @battler.critical)
 
 -         @battler.animation_id = 0
 
 -       end
 
 -       # 伤害
 
 -       if @battler.damage_pop
 
 -         @battler.damage = nil
 
 -         @battler.critical = false
 
 -         @battler.damage_pop = false
 
 -       end
 
 -       # korapusu
 
 -       if @battler.damage == nil and @battler.dead?
 
 -         if @battler.is_a?(Game_Enemy)
 
 -           $game_system.se_play($data_system.enemy_collapse_se)
 
 -           collapse
 
 -           @battler_visible = false
 
 -           
 
 -         else
 
 -           @male=[001] #----每个角色用逗号隔开
 
 -           if @male.include?(@battler.id)
 
 -             
 
 -             #Audio.se_play("Audio/SE/SWDRSLGDIR_0358_1000-39")  #--你的文件名是你自己音效的文件名
 
 -             self.bitmap = RPG::Cache.battler(@battler_name +"_d", @battler_hue)
 
 -             @width = bitmap.width
 
 -             @height = bitmap.height
 
 -             self.ox = @width / 2
 
 -             self.oy = @height
 
 -             self.opacity = 255
 
 -             
 
 -         else
 
 -             #Audio.se_play("Audio/SE/SWDRSLGDIR_0343_1001-39")  
 
 -             
 
 -             self.bitmap = RPG::Cache.battler(@battler_name +"_d", @battler_hue)
 
 -             @width = bitmap.width
 
 -             @height = bitmap.height
 
 -             self.ox = @width / 2
 
 -             self.oy = @height
 
 -             self.opacity = 255
 
 -            end
 
 -         end
 
 -        @battler_visible = false   
 
 -       end
 
 -     end
 
 -     # 设置活动块的坐标
 
 -     if @flash_shake_switch == true
 
 -       self.x = @battler.screen_x
 
 -       self.y = @battler.screen_y
 
 -       self.z = @battler.screen_z
 
 -       @flash_shake_switch = false
 
 -     end
 
 -     if @flash_shake != 0 and @battler.damage != nil and RPG::BATTLER_JUMP
 
 -       case @flash_shake
 
 -       when 9..10
 
 -         self.x = @battler.screen_x
 
 -         self.y -=4
 
 -         self.z = @battler.screen_z
 
 -       when 6..8
 
 -         self.x = @battler.screen_x
 
 -         self.y -=2
 
 -         self.z = @battler.screen_z
 
 -       when 3..5
 
 -         self.x = @battler.screen_x
 
 -         self.y +=2
 
 -         self.z = @battler.screen_z
 
 -       when 2
 
 -         self.x = @battler.screen_x
 
 -         self.y += 4
 
 -         self.z = @battler.screen_z
 
 -       when 1
 
 -         self.x = @battler.screen_x
 
 -         self.y = @battler.screen_y
 
 -         self.z = @battler.screen_z
 
 -       end
 
 -       @flash_shake -= 1
 
 -     end
 
 -   end
 
 - end
 
  复制代码 
为什么一用法术就会出: 
127行发生了ArgumentError。wrong number of arguments(4 for 2) 
昨天还好好的。  版务信息:本贴由楼主自主结贴~ |   
 
 
 
 |