#============================================================================== # ■ Game_Character (分割定义 2) #------------------------------------------------------------------------------ # 处理角色的类。本类作为 Game_Player 类与 Game_Event # 类的超级类使用。 #============================================================================== class Game_Character #-------------------------------------------------------------------------- # ● 刷新画面 #-------------------------------------------------------------------------- def update ex = $game_player.x ey = $game_player.y if $game_player.direction == 2 ey -= 1 elsif $game_player.direction == 4 ex -= 1 elsif $game_player.direction == 6 ex += 1 elsif $game_player.direction == 8 ey += 1 end if $game_map.terrain_tag(ex, ey) == 7 $game_temp.common_event_id = 15 end
#==============================================================================
# ■ Game_Character (分割定义 2)
#------------------------------------------------------------------------------
# 处理角色的类。本类作为 Game_Player 类与 Game_Event
# 类的超级类使用。
#==============================================================================
class Game_Character
#--------------------------------------------------------------------------
# ● 刷新画面
#--------------------------------------------------------------------------
def update
ex = $game_player.x
ey = $game_player.y
if $game_player.direction == 2
ey -= 1
elsif $game_player.direction == 4
ex -= 1
elsif $game_player.direction == 6
ex += 1
elsif $game_player.direction == 8
ey += 1
end
if $game_map.terrain_tag(ex, ey) == 7
$game_temp.common_event_id = 15
end
有点蠢的方法,供参考 |