#==============================================================================
# ■ EFS_Arrow
#------------------------------------------------------------------------------
# 定义弓箭失的类
#==============================================================================
class EFS_Arrow < Sprite
#--------------------------------------------------------------------------
# ● 定义类变量
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
# ● 初始化数据
#--------------------------------------------------------------------------
def initialize(viewport)
super(viewport)
@direction = 2
end
#--------------------------------------------------------------------------
# ● 发射箭失
#--------------------------------------------------------------------------
def display(fighter) #必须是Fighter.event
@direction = fighter.event.direction
@x = fighter.event.x*32 - 34
@y = fighter.event.y*32 - 68
if self.bitmap==nil
self.bitmap=RPG::Cache.character("arrow",0)
self.x = @x
self.y = @y
self.ox = $game_map.display_x / 4
self.oy = $game_map.display_y / 4
self.src_rect.set(0,(@direction/2-1)*100, 100, 100)
end
end
end