- 注册时间
- 2004-11-7
- 最后登录
- 2009-7-28
⑦老手
pliskin
- 积分
- 7004
|
#效果:当开关1开启的时候,会在地图上显示角色1当前的装备
class Window_firweapon < Window_Base
def initialize
super(0, 0, 120, 100)#
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
def refresh
if $game_switches[1]#
self.contents.clear
@actor = $data_actors[1]#
@data = []
@data.push($data_weapons[@actor.weapon_id])
@data.push($data_armors[@actor.armor1_id])
@data.push($data_armors[@actor.armor2_id])
@data.push($data_armors[@actor.armor3_id])
@data.push($data_armors[@actor.armor4_id])
sizz_item_name(@data[0], 78, 32)
sizz_item_name(@data[1], 142,32)
sizz_item_name(@data[2], 110,0)
sizz_item_name(@data[3], 110,32)
sizz_item_name(@data[4], 142,0)
end
end
end
def sizz_item_name(item, x, y)
if item == nil
return
end
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(x-80, y, bitmap, Rect.new(0, 0, 24, 24))
end
class Scene_Map
alias firweapon_main main
def main
@firweapon_window = Window_firweapon.new
@firweapon_window.opacity = 0
firweapon_main
@firweapon_window.dispose
end
end
后记:我承认自己很懒,别的就不想说什么了. |
|