加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
这样的话可以显示遇怪的剩余步数,但是只有打开并关闭菜单或者战斗后才能刷新数字。请问怎么能在地图上行走的情况下实时刷新数字
#============================================================================== # ■ Window_Douzhi #------------------------------------------------------------------------------ # 菜单画面显示剩余遇敌步数的窗口。 #============================================================================== class Window_Yudi < Window_Base #-------------------------------------------------------------------------- # ● 初始化对像 #-------------------------------------------------------------------------- def initialize super(0, 0, 160, 96) self.contents = Bitmap.new(width - 32, height - 32) refresh end #-------------------------------------------------------------------------- # ● 刷新 #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(4, 0, 120, 32, "剩余步数:") self.contents.font.color = normal_color self.contents.draw_text(4, 32, 120, 32, $game_player.encounter_count.to_s, 2) end end
#==============================================================================
# ■ Window_Douzhi
#------------------------------------------------------------------------------
# 菜单画面显示剩余遇敌步数的窗口。
#==============================================================================
class Window_Yudi < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像
#--------------------------------------------------------------------------
def initialize
super(0, 0, 160, 96)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 120, 32, "剩余步数:")
self.contents.font.color = normal_color
self.contents.draw_text(4, 32, 120, 32, $game_player.encounter_count.to_s, 2)
end
end
|