| 赞 | 1 |
| VIP | |
| 好人卡 | |
| 积分 | 1 |
| 经验 | |
| 最后登录 | 2017-10-21 |
| 在线时间 | 1617 小时 |
炎
- 梦石
- 0
- 星屑
- 98
- 在线时间
- 1617 小时
- 注册时间
- 2013-8-15
- 回帖
- 4322
|
发表于 2014-11-3 17:44:19
|
显示全部楼层
覆盖Scene_MenuBase- #encoding:utf-8
- #==============================================================================
- # ■ Scene_MenuBase
- #------------------------------------------------------------------------------
- # 所有菜单画面的基本处理
- #==============================================================================
- class Scene_MenuBase < Scene_Base
- #--------------------------------------------------------------------------
- # ● 开始处理
- #--------------------------------------------------------------------------
- def start
- super
- create_background
- @actor = $game_party.menu_actor
- end
- #--------------------------------------------------------------------------
- # ● 结束处理
- #--------------------------------------------------------------------------
- def terminate
- super
- dispose_background
- end
- #--------------------------------------------------------------------------
- # ● 生成背景
- #--------------------------------------------------------------------------
- def create_background
- @background_sprite = Sprite.new
- @background_sprite.bitmap = Cache.title1("logo")
- @background_sprite.color.set(255, 255, 255, -255)
- end
- #--------------------------------------------------------------------------
- # ● 释放背景
- #--------------------------------------------------------------------------
- def dispose_background
- @background_sprite.dispose
- end
- #--------------------------------------------------------------------------
- # ● 生成帮助窗口
- #--------------------------------------------------------------------------
- def create_help_window
- @help_window = Window_Help.new
- @help_window.viewport = @viewport
- end
- #--------------------------------------------------------------------------
- # ● 切换到下一个角色
- #--------------------------------------------------------------------------
- def next_actor
- @actor = $game_party.menu_actor_next
- on_actor_change
- end
- #--------------------------------------------------------------------------
- # ● 切换到上一个角色
- #--------------------------------------------------------------------------
- def prev_actor
- @actor = $game_party.menu_actor_prev
- on_actor_change
- end
- #--------------------------------------------------------------------------
- # ● 切换角色
- #--------------------------------------------------------------------------
- def on_actor_change
- end
- end
复制代码
覆盖Scene_ItemBase
覆盖Scene_Skill- #encoding:utf-8
- #==============================================================================
- # ■ Scene_Skill
- #------------------------------------------------------------------------------
- # 技能画面
- # 为了方便共通化处理,这里把技能也称为“物品”。
- #==============================================================================
- class Scene_Skill < Scene_ItemBase
- #--------------------------------------------------------------------------
- # ● 开始处理
- #--------------------------------------------------------------------------
- def start
- super
- create_help_window
- create_command_window
- create_status_window
- create_item_window
- end
- #--------------------------------------------------------------------------
- # ● 生成背景
- #--------------------------------------------------------------------------
- def create_background
- @background_sprite = Sprite.new
- @background_sprite.bitmap = Cache.title1("logo")
- @background_sprite.color.set(255, 255, 255, -255)
- end
- #--------------------------------------------------------------------------
- # ● 生成指令窗口
- #--------------------------------------------------------------------------
- def create_command_window
- wy = @help_window.height
- @command_window = Window_SkillCommand.new(0, wy)
- @command_window.viewport = @viewport
- @command_window.help_window = @help_window
- @command_window.actor = @actor
- @command_window.set_handler(:skill, method(:command_skill))
- @command_window.set_handler(:cancel, method(:return_scene))
- @command_window.set_handler(:pagedown, method(:next_actor))
- @command_window.set_handler(:pageup, method(:prev_actor))
- end
- #--------------------------------------------------------------------------
- # ● 生成状态窗口
- #--------------------------------------------------------------------------
- def create_status_window
- y = @help_window.height
- @status_window = Window_SkillStatus.new(@command_window.width, y)
- @status_window.viewport = @viewport
- @status_window.actor = @actor
- end
- #--------------------------------------------------------------------------
- # ● 生成物品窗口
- #--------------------------------------------------------------------------
- def create_item_window
- wx = 0
- wy = @status_window.y + @status_window.height
- ww = Graphics.width
- wh = Graphics.height - wy
- @item_window = Window_SkillList.new(wx, wy, ww, wh)
- @item_window.actor = @actor
- @item_window.viewport = @viewport
- @item_window.help_window = @help_window
- @item_window.set_handler(:ok, method(:on_item_ok))
- @item_window.set_handler(:cancel, method(:on_item_cancel))
- @command_window.skill_window = @item_window
- end
- #--------------------------------------------------------------------------
- # ● 获取技能的使用者
- #--------------------------------------------------------------------------
- def user
- @actor
- end
- #--------------------------------------------------------------------------
- # ● 指令“技能”
- #--------------------------------------------------------------------------
- def command_skill
- @item_window.activate
- @item_window.select_last
- end
- #--------------------------------------------------------------------------
- # ● 物品“确定”
- #--------------------------------------------------------------------------
- def on_item_ok
- @actor.last_skill.object = item
- determine_item
- end
- #--------------------------------------------------------------------------
- # ● 物品“取消”
- #--------------------------------------------------------------------------
- def on_item_cancel
- @item_window.unselect
- @command_window.activate
- end
- #--------------------------------------------------------------------------
- # ● 播放物品使用声效
- #--------------------------------------------------------------------------
- def play_se_for_item
- Sound.play_use_skill
- end
- #--------------------------------------------------------------------------
- # ● 使用物品
- #--------------------------------------------------------------------------
- def use_item
- super
- @status_window.refresh
- @item_window.refresh
- end
- #--------------------------------------------------------------------------
- # ● 切换角色
- #--------------------------------------------------------------------------
- def on_actor_change
- @command_window.actor = @actor
- @status_window.actor = @actor
- @item_window.actor = @actor
- @command_window.activate
- end
- end
复制代码
覆盖Scene_Equip- #encoding:utf-8
- #==============================================================================
- # ■ Scene_Equip
- #------------------------------------------------------------------------------
- # 装备画面
- #==============================================================================
- class Scene_Equip < Scene_MenuBase
- #--------------------------------------------------------------------------
- # ● 开始处理
- #--------------------------------------------------------------------------
- def start
- super
- create_help_window
- create_status_window
- create_command_window
- create_slot_window
- create_item_window
- end
- #--------------------------------------------------------------------------
- # ● 生成背景
- #--------------------------------------------------------------------------
- def create_background
- @background_sprite = Sprite.new
- @background_sprite.bitmap = Cache.title1("logo")
- @background_sprite.color.set(255, 255, 255, -255)
- end
- #--------------------------------------------------------------------------
- # ● 生成状态窗口
- #--------------------------------------------------------------------------
- def create_status_window
- @status_window = Window_EquipStatus.new(0, @help_window.height)
- @status_window.viewport = @viewport
- @status_window.actor = @actor
- end
- #--------------------------------------------------------------------------
- # ● 生成指令窗口
- #--------------------------------------------------------------------------
- def create_command_window
- wx = @status_window.width
- wy = @help_window.height
- ww = Graphics.width - @status_window.width
- @command_window = Window_EquipCommand.new(wx, wy, ww)
- @command_window.viewport = @viewport
- @command_window.help_window = @help_window
- @command_window.set_handler(:equip, method(:command_equip))
- @command_window.set_handler(:optimize, method(:command_optimize))
- @command_window.set_handler(:clear, method(:command_clear))
- @command_window.set_handler(:cancel, method(:return_scene))
- @command_window.set_handler(:pagedown, method(:next_actor))
- @command_window.set_handler(:pageup, method(:prev_actor))
-
- end
- #--------------------------------------------------------------------------
- # ● 生成装备栏窗口
- #--------------------------------------------------------------------------
- def create_slot_window
- wx = @status_window.width
- wy = @command_window.y + @command_window.height
- ww = Graphics.width - @status_window.width
- @slot_window = Window_EquipSlot.new(wx, wy, ww)
- @slot_window.viewport = @viewport
- @slot_window.help_window = @help_window
- @slot_window.status_window = @status_window
- @slot_window.actor = @actor
- @slot_window.set_handler(:ok, method(:on_slot_ok))
- @slot_window.set_handler(:cancel, method(:on_slot_cancel))
- end
- #--------------------------------------------------------------------------
- # ● 生成物品窗口
- #--------------------------------------------------------------------------
- def create_item_window
- wx = 0
- wy = @slot_window.y + @slot_window.height
- ww = Graphics.width
- wh = Graphics.height - wy
- @item_window = Window_EquipItem.new(wx, wy, ww, wh)
- @item_window.viewport = @viewport
- @item_window.help_window = @help_window
- @item_window.status_window = @status_window
- @item_window.actor = @actor
- @item_window.set_handler(:ok, method(:on_item_ok))
- @item_window.set_handler(:cancel, method(:on_item_cancel))
- @slot_window.item_window = @item_window
- end
- #--------------------------------------------------------------------------
- # ● 指令“更换装备”
- #--------------------------------------------------------------------------
- def command_equip
- @slot_window.activate
- @slot_window.select(0)
- end
- #--------------------------------------------------------------------------
- # ● 指令“最强装备”
- #--------------------------------------------------------------------------
- def command_optimize
- Sound.play_equip
- @actor.optimize_equipments
- @status_window.refresh
- @slot_window.refresh
- @command_window.activate
- end
- #--------------------------------------------------------------------------
- # ● 指令“全部卸下”
- #--------------------------------------------------------------------------
- def command_clear
- Sound.play_equip
- @actor.clear_equipments
- @status_window.refresh
- @slot_window.refresh
- @command_window.activate
- end
- #--------------------------------------------------------------------------
- # ● 装备栏“确定”
- #--------------------------------------------------------------------------
- def on_slot_ok
- @item_window.activate
- @item_window.select(0)
- end
- #--------------------------------------------------------------------------
- # ● 装备栏“取消”
- #--------------------------------------------------------------------------
- def on_slot_cancel
- @slot_window.unselect
- @command_window.activate
- end
- #--------------------------------------------------------------------------
- # ● 物品“确定”
- #--------------------------------------------------------------------------
- def on_item_ok
- Sound.play_equip
- @actor.change_equip(@slot_window.index, @item_window.item)
- @slot_window.activate
- @slot_window.refresh
- @item_window.unselect
- @item_window.refresh
- end
- #--------------------------------------------------------------------------
- # ● 物品“取消”
- #--------------------------------------------------------------------------
- def on_item_cancel
- @slot_window.activate
- @item_window.unselect
- end
- #--------------------------------------------------------------------------
- # ● 切换角色
- #--------------------------------------------------------------------------
- def on_actor_change
- @status_window.actor = @actor
- @slot_window.actor = @actor
- @item_window.actor = @actor
- @command_window.activate
- end
- end
复制代码
覆盖Scene_Status- #encoding:utf-8
- #==============================================================================
- # ■ Scene_Status
- #------------------------------------------------------------------------------
- # 状态画面
- #==============================================================================
- class Scene_Status < Scene_MenuBase
- #--------------------------------------------------------------------------
- # ● 开始处理
- #--------------------------------------------------------------------------
- def start
- super
- @status_window = Window_Status.new(@actor)
- @status_window.set_handler(:cancel, method(:return_scene))
- @status_window.set_handler(:pagedown, method(:next_actor))
- @status_window.set_handler(:pageup, method(:prev_actor))
- end
- #--------------------------------------------------------------------------
- # ● 生成背景
- #--------------------------------------------------------------------------
- def create_background
- @background_sprite = Sprite.new
- @background_sprite.bitmap = Cache.title1("logo")
- @background_sprite.color.set(255, 255, 255, -255)
- end
- #--------------------------------------------------------------------------
- # ● 切换角色
- #--------------------------------------------------------------------------
- def on_actor_change
- @status_window.actor = @actor
- @status_window.activate
- end
- end
复制代码
把你要放的图片放在"Titles1"的File里,并取名为"Logo" |
评分
-
查看全部评分
|