赞 | 0 |
VIP | 136 |
好人卡 | 4 |
积分 | 1 |
经验 | 2058 |
最后登录 | 2013-1-17 |
在线时间 | 142 小时 |
Lv1.梦旅人 辉瑞中国首席研究员<
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 142 小时
- 注册时间
- 2008-1-18
- 帖子
- 2129
|
module RPG
class Item
def name
name = @name.split(/,/)[0]
return name != nil ? name : ''
end
def actor_id
actor_id = @name.split(/,/)[1]
return actor_id != nil ? actor_id.to_i : -1
end
end
end
Window_Item draw_item
if item.actor_id >= 0 then
for actor in $game_party.actors
if actor.id == item.actor_id and actor.item_id.include?(item.id)then
x = 4 + index % 2 * (288 + 32)
y = index / 2 * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(item.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
else
..........................
class Game_Battler
attr_accessor :item_id
def initialize
@item_id = []
end
end
另外Scene_Item中减少也要改 |
|