level 2
HDT_3S
楼主
我新建了两个脚本:
第一个脚本Window_MapStatus
#==============================================================================
# ■ Window_MapStatus
#------------------------------------------------------------------------------
# 地图画面显示金钱、步数与积分的窗口。
#==============================================================================
class Window_MapStatus < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像
#--------------------------------------------------------------------------
def initialize
super(0, 0, 640, 64)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, 60, 32, $game_party.gold.to_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 150, 32, $data_system.words.gold, 2)
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 360, 32, " 步数")
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, 400, 32, $game_party.steps.to_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 512, 32, " 积分")
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, 576, 32, ($game_party.steps + $game_variables[5]).to_s, 2)
end
end
第二个脚本Scene_MapStatus
#==============================================================================
# ■ Scene_MapStatus
#------------------------------------------------------------------------------
# 处理地图画面中状态的类。
#==============================================================================
class Scene_MapStatus
#---------------------------------------------------------------------------
2010年08月01日 03点08分
1
第一个脚本Window_MapStatus
#==============================================================================
# ■ Window_MapStatus
#------------------------------------------------------------------------------
# 地图画面显示金钱、步数与积分的窗口。
#==============================================================================
class Window_MapStatus < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像
#--------------------------------------------------------------------------
def initialize
super(0, 0, 640, 64)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, 60, 32, $game_party.gold.to_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 150, 32, $data_system.words.gold, 2)
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 360, 32, " 步数")
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, 400, 32, $game_party.steps.to_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 512, 32, " 积分")
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, 576, 32, ($game_party.steps + $game_variables[5]).to_s, 2)
end
end
第二个脚本Scene_MapStatus
#==============================================================================
# ■ Scene_MapStatus
#------------------------------------------------------------------------------
# 处理地图画面中状态的类。
#==============================================================================
class Scene_MapStatus
#---------------------------------------------------------------------------