查看: 966|回复: 1

怎样把购买魔法用的灵魂和金钱一起显示

  [复制链接]
梦石
0
星屑
50
在线时间
19 小时
注册时间
2008-9-20
回帖
61
发表于 2009-3-7 20:57:58 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
我做了一个魔法商店是用灵魂来购买的,可是菜单内只有显示金钱的数量而没有显示灵魂的数量,怎样可以在菜单内显示灵魂的数量呀!
此贴于 2009-3-8 13:12:00 被版主redant提醒,请楼主看到后对本贴做出回应。
梦石
0
星屑
7095
在线时间
1666 小时
注册时间
2008-10-29
回帖
6612

贵宾

发表于 2009-3-7 21:40:36 | 显示全部楼层
#==============================================================================
# ■ 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











你知道得太多了

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部