class Scene_Battle
#--------------------------------------------------------------------------
# ● 定义实例变量
#--------------------------------------------------------------------------
attr_reader :animation1_id # 行动方动画ID
end
class Sprite_Battler < RPG::Sprite
#--------------------------------------------------------------------------
# ● 处理角色动作
#--------------------------------------------------------------------------
def update_actor_animation
if @battler.is_a?(Game_Actor)
if @battler.show_damage_value != nil
self.damage(@battler.show_damage_value, false)
@battler.show_damage(nil)
@battler.setup_battler_ani(@battler.battler_name.split(/★/)[3], 1)
@battler.setup_battler_hurt_ani(1)
end
if @battler.current_action.kind == 0 and @battler.current_action.basic == 1
else
if @hits == 1 and not @battler.dead? and @battler.battler_hurt_ani != 1 and @battler.damage.is_a?(Numeric) and @battler.damage > 0
@battler.setup_battler_ani(@battler.battler_name.split(/★/)[3], 1)
@battler.setup_battler_hurt_ani(1)
elsif @frame_index == @last_frame and @battler.dead? and @battler.battler_dead_ani != 1
for actor in $game_party.actors
if @battler != actor
actor.add_state(6)
end
end
@battler.setup_battler_ani(@battler.battler_name.split(/★/)[4], 1)
@battler.setup_battler_dead_ani(1)
end
end
end
end
#--------------------------------------------------------------------------
# ● 处理敌人动作
#--------------------------------------------------------------------------
def update_enemy_animation
if @battler.is_a?(Game_Enemy)
if @battler.show_damage_value != nil
self.damage(@battler.show_damage_value, false)
@battler.show_damage(nil)
@battler.setup_battler_ani(@battler.battler_name.split(/★/)[3], 1)
@battler.setup_battler_hurt_ani(1)
end
if @battler.current_action.kind == 0 and @battler.current_action.basic == 1
else
if @hits == 1 and not @battler.dead? and @battler.battler_hurt_ani != 1 and @battler.damage.is_a?(Numeric) and @battler.damage > 0
@battler.setup_battler_ani(@battler.battler_name.split(/★/)[3], 1)
@battler.setup_battler_hurt_ani(1)
elsif @frame_index == @last_frame and @battler.dead? and @battler.battler_dead_ani != 1
@battler.setup_battler_ani(@battler.battler_name.split(/★/)[4], 1)
@battler.setup_battler_dead_ani(1)
collapse
end
end
end
end
end 作者: 大宇宙时代 时间: 2013-9-18 20:27
全动画脚本敌人死亡,如何添加死亡静态。