358429534 发表于 2012-8-17 21:44
小白再请教就是要添加2个以上指令要如何做???谢谢!
#-------------------------------------------------------------------------- # ● 指令一 #-------------------------------------------------------------------------- class Window_MenuCommand < Window_Command alias itemSynthesis_add_main_commands add_main_commands def add_main_commands itemSynthesis_add_main_commands add_command("合成", :ItemSynthesis, main_commands_enabled) end end class Scene_Menu < Scene_MenuBase alias itemSynthesis_create_command_window create_command_window def create_command_window itemSynthesis_create_command_window @command_window.set_handler(:ItemSynthesis, method(:Item_Synthesis)) end def Item_Synthesis SceneManager.call(Scene_ItemSynthesis) end end #-------------------------------------------------------------------------- # ● 指令二 #-------------------------------------------------------------------------- class Window_MenuCommand < Window_Command alias itemSynthesis_add_main_commands add_main_commands def add_main_commands itemSynthesis_add_main_commands add_command("合成", :ItemSynthesis, main_commands_enabled) end end class Scene_Menu < Scene_MenuBase alias itemSynthesis_create_command_window create_command_window def create_command_window itemSynthesis_create_command_window @command_window.set_handler(:ItemSynthesis, method(:Item_Synthesis)) end def Item_Synthesis SceneManager.call(Scene_ItemSynthesis) end end
#--------------------------------------------------------------------------
# ● 指令一
#--------------------------------------------------------------------------
class Window_MenuCommand < Window_Command
alias itemSynthesis_add_main_commands add_main_commands
def add_main_commands
itemSynthesis_add_main_commands
add_command("合成", :ItemSynthesis, main_commands_enabled)
end
end
class Scene_Menu < Scene_MenuBase
alias itemSynthesis_create_command_window create_command_window
def create_command_window
itemSynthesis_create_command_window
@command_window.set_handler(:ItemSynthesis, method(:Item_Synthesis))
end
def Item_Synthesis
SceneManager.call(Scene_ItemSynthesis)
end
end
#--------------------------------------------------------------------------
# ● 指令二
#--------------------------------------------------------------------------
class Window_MenuCommand < Window_Command
alias itemSynthesis_add_main_commands add_main_commands
def add_main_commands
itemSynthesis_add_main_commands
add_command("合成", :ItemSynthesis, main_commands_enabled)
end
end
class Scene_Menu < Scene_MenuBase
alias itemSynthesis_create_command_window create_command_window
def create_command_window
itemSynthesis_create_command_window
@command_window.set_handler(:ItemSynthesis, method(:Item_Synthesis))
end
def Item_Synthesis
SceneManager.call(Scene_ItemSynthesis)
end
end
要幾個 就弄幾個
他依序排下來的
|