查看: 1368|回复: 1

測試

[复制链接]

蝦米

梦石
0
星屑
130
在线时间
280 小时
注册时间
2006-7-5
回帖
553
发表于 2012-1-31 19:41:39 | 显示全部楼层 |阅读模式

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

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

×
[pre lang="ruby"]p "hello world"[/pre]


  • 更新完成啦
  • 梦石
    0
    星屑
    894
    在线时间
    6267 小时
    注册时间
    2006-6-7
    回帖
    8173
发表于 2012-1-31 19:45:32 | 显示全部楼层
[pre lang="ruby"]class Window_ShopBuy < Window_Selectable
  #--------------------------------------------------------------------------
  # ● 初始化对像
  #     shop_goods : 商品
  #--------------------------------------------------------------------------
  def initialize(shop_goods)
    super(0, 128, 368, 352)
    @shop_goods = shop_goods
    refresh
    self.index = 0
  end
  #--------------------------------------------------------------------------
  # ● 获取物品
  #--------------------------------------------------------------------------
  def item
    return @data[self.index]
  end
  #--------------------------------------------------------------------------
  # ● 刷新
  #--------------------------------------------------------------------------
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    for goods_item in @shop_goods
      case goods_item[0]
      when 0
        item = $data_items[goods_item[1]]
      when 1
        item = $data_weapons[goods_item[1]]
      when 2
        item = $data_armors[goods_item[1]]
      end[/pre]

回复

使用道具 举报

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

在本发帖返回顶部