本帖最后由 js127291 于 2016-5-6 20:08 编辑 #============================================================================== # ■ Window_EquipRight #------------------------------------------------------------------------------ # 装备画面、显示角色现在装备的物品的窗口。 #============================================================================== class Window_EquipRight < Window_Selectable #-------------------------------------------------------------------------- # ● 初始化对像 # actor : 角色 #-------------------------------------------------------------------------- def initialize(actor) super(272, 64, 368, 192) self.contents = Bitmap.new(width - 32, height - 32) @actor = actor refresh self.index = 0 end #-------------------------------------------------------------------------- # ● 获取物品 #-------------------------------------------------------------------------- def item return @data[self.index] end #-------------------------------------------------------------------------- # ● 刷新 #-------------------------------------------------------------------------- def refresh self.contents.clear @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]) @item_max = @data.size self.contents.font.color = system_color self.contents.draw_text(4, 32 * 0, 92, 32, $data_system.words.weapon) self.contents.draw_text(4, 32 * 1, 92, 32, $data_system.words.armor1) self.contents.draw_text(4, 32 * 2, 92, 32, $data_system.words.armor2) self.contents.draw_text(4, 32 * 3, 92, 32, $data_system.words.armor3) self.contents.draw_text(5, 32 * 4, 92, 32, $data_system.words.armor4) draw_item_name(@data[0], 92, 32 * 0) draw_item_name(@data[1], 92, 32 * 1) draw_item_name(@data[2], 92, 32 * 2) draw_item_name(@data[3], 92, 32 * 3) draw_item_name(@data[4], 92, 32 * 4) end #-------------------------------------------------------------------------- # ● 刷新帮助文本 #-------------------------------------------------------------------------- def update_help @help_window.set_text(self.item == nil ? "" : self.item.description) end end 这是Window_EquipRight 的脚本,截图在上楼,请大神指点怎么修改??? 还有一个问题,我想吧下面2个物品名称:道具和装饰改成书籍和玉石。怎么改?? |
装备扩展,又不懂的地方欢迎回复 RUBY 代码复制
|
站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作
GMT+8, 2024-11-27 22:13
Powered by Discuz! X3.1
© 2001-2013 Comsenz Inc.