Line 390-408
#-------------------------------------------------------------------------- # ● 跟随角色 #-------------------------------------------------------------------------- def follow(ensure_height) x = @character.screen_x y = @character.screen_y if $game_temp.in_battle height = RPG::Cache.battler(@character.battler_name, 0).height else height = RPG::Cache.character(@character.character_name, 0).height >> 2 height = 48 if height == 0 end under = y - height - 12 < ensure_height if @under != under @under = under load end self.x = x self.y = @under ? y : y - height end
#--------------------------------------------------------------------------
# ● 跟随角色
#--------------------------------------------------------------------------
def follow(ensure_height)
x = @character.screen_x
y = @character.screen_y
if $game_temp.in_battle
height = RPG::Cache.battler(@character.battler_name, 0).height
else
height = RPG::Cache.character(@character.character_name, 0).height >> 2
height = 48 if height == 0
end
under = y - height - 12 < ensure_height
if @under != under
@under = under
load
end
self.x = x
self.y = @under ? y : y - height
end
如果\@指向的是一个空事件,会有48的默认高度 |