Project1
标题:
怎样把购买魔法用的灵魂和金钱一起显示
[打印本页]
作者:
langdeluoyin
时间:
2009-3-7 20:57
标题:
怎样把购买魔法用的灵魂和金钱一起显示
我做了一个魔法商店是用灵魂来购买的,可是菜单内只有显示金钱的数量而没有显示灵魂的数量,怎样可以在菜单内显示灵魂的数量呀! [LINE]1,#dddddd[/LINE]
此贴于 2009-3-8 13:12:00 被版主redant提醒,请楼主看到后对本贴做出回应。
作者:
后知后觉
时间:
2009-3-7 21:40
#==============================================================================
# ■ Window_Gold
#------------------------------------------------------------------------------
# 显示金钱的窗口。
#==============================================================================
class Window_Gold < Window_Base
#--------------------------------------------------------------------------
# ● 初始化窗口
#--------------------------------------------------------------------------
def initialize
super(0, 0, 160, 96)
self.contents = Bitmap.new(width - 32, height - 32)
self.z += 10
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
cx = contents.text_size($data_system.words.gold).width
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, 120-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(124-cx, 0, cx, 32, $data_system.words.gold, 2)
cx2 = contents.text_size("灵魂").width
self.contents.font.color = normal_color
self.contents.draw_text(4, 32, 120-cx2-2, 32, $game_variables[变量编号].to_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(124-cx2, 32, cx2, 32, "灵魂", 2)
end
end
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1