本帖最后由 howhow1314 于 2015-6-6 11:38 编辑
#-------------------------------------------------------------------------- # ● 可視状態の初期化 #-------------------------------------------------------------------------- def init_visibility @battler_visible = @battler.alive? self.opacity = 255 #加這行 self.opacity = 0 unless @battler_visible end #-------------------------------------------------------------------------- # ● 位置の更新 #-------------------------------------------------------------------------- def update_position init_visibility #加這行 self.x = @battler.screen_x self.y = @battler.screen_y - @bitmap_data.height self.z = @battler.screen_z + 10 end
#--------------------------------------------------------------------------
# ● 可視状態の初期化
#--------------------------------------------------------------------------
def init_visibility
@battler_visible = @battler.alive?
self.opacity = 255 #加這行
self.opacity = 0 unless @battler_visible
end
#--------------------------------------------------------------------------
# ● 位置の更新
#--------------------------------------------------------------------------
def update_position
init_visibility #加這行
self.x = @battler.screen_x
self.y = @battler.screen_y - @bitmap_data.height
self.z = @battler.screen_z + 10
end
|