本帖最后由 foot1982 于 2019-12-18 09:15 编辑 我想要把战斗指令窗口给挪到行动角色的头顶上 在Scene_Battle里面 备注掉了 # @actor_command_window.viewport = @info_viewport 和 # ...
#==============================================================================# ■ Scene_Battle#------------------------------------------------------------------------------# 战斗画面#============================================================================== class Scene_Battle #-------------------------------------------------------------------------- # ● 指令“攻击” #-------------------------------------------------------------------------- alias command_attack_for_hiding_actor_command_window command_attack def command_attack command_attack_for_hiding_actor_command_window @actor_command_window.hide end #-------------------------------------------------------------------------- # ● 指令“技能” #-------------------------------------------------------------------------- alias command_skill_for_hiding_actor_command_window command_skill def command_skill command_skill_for_hiding_actor_command_window @actor_command_window.hide end #-------------------------------------------------------------------------- # ● 指令“物品” #-------------------------------------------------------------------------- alias command_item_for_hiding_actor_command_window command_item def command_item command_item_for_hiding_actor_command_window @actor_command_window.hide end #-------------------------------------------------------------------------- # ● 敌人“取消” #-------------------------------------------------------------------------- alias on_enemy_cancel_for_showing_actor_command_window on_enemy_cancel def on_enemy_cancel on_enemy_cancel_for_showing_actor_command_window if (w = @actor_command_window).current_symbol == :attack then w.show end end #-------------------------------------------------------------------------- # ● 技能“取消” #-------------------------------------------------------------------------- alias on_skill_cancel_for_showing_actor_command_window on_skill_cancel def on_skill_cancel on_skill_cancel_for_showing_actor_command_window @actor_command_window.show end #-------------------------------------------------------------------------- # ● 物品“取消” #-------------------------------------------------------------------------- alias on_item_cancel_for_showing_actor_command_window on_item_cancel def on_item_cancel on_item_cancel_for_showing_actor_command_window @actor_command_window.show endend #==============================================================================# ■ Window_ActorCommand#------------------------------------------------------------------------------# 战斗画面中,选择角色行动的窗口。#============================================================================== class Window_ActorCommand #-------------------------------------------------------------------------- # ● 设置 #-------------------------------------------------------------------------- alias setup_for_position_fixing setup def setup(actor) setup_for_position_fixing(actor) index = $game_party.members.index(actor) status_window = SceneManager.scene.instance_variable_get(:@status_window) whole_width = status_window.width self.x = index * whole_width / $game_party.max_battle_members self.y = Graphics.height - status_window.height - self.height self.show endend
#============================================================================== # ■ Scene_Battle #------------------------------------------------------------------------------ # 战斗画面 #============================================================================== class Scene_Battle #-------------------------------------------------------------------------- # ● 指令“攻击” #-------------------------------------------------------------------------- alias command_attack_for_hiding_actor_command_window command_attack def command_attack command_attack_for_hiding_actor_command_window @actor_command_window.hide end #-------------------------------------------------------------------------- # ● 指令“技能” #-------------------------------------------------------------------------- alias command_skill_for_hiding_actor_command_window command_skill def command_skill command_skill_for_hiding_actor_command_window @actor_command_window.hide end #-------------------------------------------------------------------------- # ● 指令“物品” #-------------------------------------------------------------------------- alias command_item_for_hiding_actor_command_window command_item def command_item command_item_for_hiding_actor_command_window @actor_command_window.hide end #-------------------------------------------------------------------------- # ● 敌人“取消” #-------------------------------------------------------------------------- alias on_enemy_cancel_for_showing_actor_command_window on_enemy_cancel def on_enemy_cancel on_enemy_cancel_for_showing_actor_command_window if (w = @actor_command_window).current_symbol == :attack then w.show end end #-------------------------------------------------------------------------- # ● 技能“取消” #-------------------------------------------------------------------------- alias on_skill_cancel_for_showing_actor_command_window on_skill_cancel def on_skill_cancel on_skill_cancel_for_showing_actor_command_window @actor_command_window.show end #-------------------------------------------------------------------------- # ● 物品“取消” #-------------------------------------------------------------------------- alias on_item_cancel_for_showing_actor_command_window on_item_cancel def on_item_cancel on_item_cancel_for_showing_actor_command_window @actor_command_window.show end end #============================================================================== # ■ Window_ActorCommand #------------------------------------------------------------------------------ # 战斗画面中,选择角色行动的窗口。 #============================================================================== class Window_ActorCommand #-------------------------------------------------------------------------- # ● 设置 #-------------------------------------------------------------------------- alias setup_for_position_fixing setup def setup(actor) setup_for_position_fixing(actor) index = $game_party.members.index(actor) status_window = SceneManager.scene.instance_variable_get(:@status_window) whole_width = status_window.width self.x = index * whole_width / $game_party.max_battle_members self.y = Graphics.height - status_window.height - self.height self.show end end
查看全部评分
折叠内容标题(非必须)
折叠内容
站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作
GMT+8, 2024-11-16 14:20
Powered by Discuz! X3.1
© 2001-2013 Comsenz Inc.