加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
好吧可能标题没怎么说清楚。va帮助文档里有一个关于制作游戏提示画面的教程,我打算修改一下用作自己的用途,记一些游戏数据什么的。但是如果我需要在里面多绘制几个窗口,该用哪个方法呢?
#----------------------- #●选项给我弄出来 #----------------------- class Window_MenuCommand alias xxx001_add_original_commands add_original_commands def add_original_commands xxx001_add_original_commands add_command("游戏数据", :story) end end #----------------------- #●让这玩意有用 #----------------------- class Scene_Menu alias xxx001_create_command_window create_command_window def create_command_window xxx001_create_command_window @command_window.set_handler(:story, method(:command_story)) end def command_story SceneManager.call(Scene_Story) end end #----------------------- #●创建窗口的处理 #----------------------- class Scene_Story < Scene_MenuBase def start super @story_window = Window_Story.new @story_window.set_handler(:cancel, method(:return_scene)) end end #----------------------- #●更上打广告的分公司讽德诵功 #----------------------- class Window_Story < Window_Selectable def initialize super(0, 0, 544, 48) case $game_variables[233] when 0 story = "道德:#{$game_variables[234]}" when 1 story = "呵呵呵呵呵呵呵" end draw_text_ex(4, 0, story) activate end end
#-----------------------
#●选项给我弄出来
#-----------------------
class Window_MenuCommand
alias xxx001_add_original_commands add_original_commands
def add_original_commands
xxx001_add_original_commands
add_command("游戏数据", :story)
end
end
#-----------------------
#●让这玩意有用
#-----------------------
class Scene_Menu
alias xxx001_create_command_window create_command_window
def create_command_window
xxx001_create_command_window
@command_window.set_handler(:story, method(:command_story))
end
def command_story
SceneManager.call(Scene_Story)
end
end
#-----------------------
#●创建窗口的处理
#-----------------------
class Scene_Story < Scene_MenuBase
def start
super
@story_window = Window_Story.new
@story_window.set_handler(:cancel, method(:return_scene))
end
end
#-----------------------
#●更上打广告的分公司讽德诵功
#-----------------------
class Window_Story < Window_Selectable
def initialize
super(0, 0, 544, 48)
case $game_variables[233]
when 0
story = "道德:#{$game_variables[234]}"
when 1
story = "呵呵呵呵呵呵呵"
end
draw_text_ex(4, 0, story)
activate
end
end
|