| 
 
| 赞 | 0 |  
| VIP | 4 |  
| 好人卡 | 43 |  
| 积分 | 94 |  
| 经验 | 75226 |  
| 最后登录 | 2019-3-3 |  
| 在线时间 | 1131 小时 |  
 Lv4.逐梦者 
	梦石3 星屑6420 在线时间1131 小时注册时间2007-12-26帖子2402 | 
| 红色部分的脚本是我整合进彩虹神剑的部分,用来使战斗图移动,但是多了这段脚本后我发现战斗时特技和伤害的动画显示都变得特别快,如何在保留这段脚本的情况下使动画速度恢复正常? 
 #--------------------------------------------------------------------------
 # ● 刷新画面
 #    增添跳跃功能
 #--------------------------------------------------------------------------
 alias hzhj_old_update update  #XXOO
 def update
 ###############################################################################
 hzhj_old_update
 self.x = @hzhj_x
 self.y = @hzhj_y
 if not @battler.nil? and not @battler.dead?
 if self.x < @battler.screen_x + @battler.add_x
 self.x = [self.x + MoveSpeed, @battler.screen_x + @battler.add_x].min
 elsif self.x > @battler.screen_x + @battler.add_x
 self.x = [self.x - MoveSpeed, @battler.screen_x + @battler.add_x].max
 end
 if self.y < @battler.screen_y + @battler.add_y
 self.y = [self.y + MoveSpeed, @battler.screen_y + @battler.add_y].min
 elsif self.y > @battler.screen_y + @battler.add_y
 self.y = [self.y - MoveSpeed, @battler.screen_y + @battler.add_y].max
 end
 end
 @hzhj_x = self.x
 @hzhj_y = self.y
 ###############################################################################
 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.opacity = 0
 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
 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
 | 
 |