改造标题画面
class Window_TitleCommand
alias xxx001_initialize initialize
def initialize
xxx001_initialize
self.opacity = 0
end
end
class Window_TitleCommand
def make_command_list
add_command("开始游戏", :new_game)
add_command("继续游戏", :continue, continue_enabled)
add_command("结束游戏", :shutdown)
end
end
class Window_TitleCommand
alias xxx001_create_contents create_contents
def create_contents
xxx001_create_contents
contents.font.name = "萝莉体"
contents.font.bold = true
contents.font.size = 20
end
end
class Window_TitleCommand
def alignment
return 1
end
end
module SceneManager
#--------------------------------------------------------------------------
# ○ 実行
#--------------------------------------------------------------------------
def self.run
DataManager.init
Audio.setup_midi if use_midi?
if $BTEST || CAO::StartMap::RESET_SKIP && !GameManager.first? @Scene = first_scene_class.new
else
DataManager.setup_startmap
@scene = Scene_Map.new
end
@scene.main while @scene
end
end
module GameManager; end
class << GameManager
#--------------------------------------------------------------------------
# ● 公開インスタンス変数
#--------------------------------------------------------------------------
attr_accessor :executed
#--------------------------------------------------------------------------
# ● ニューゲーム
#--------------------------------------------------------------------------
def new_game
DataManager.setup_new_game
SceneManager.scene.fadeout_all
$game_map.autoplay
SceneManager.goto(Scene_Map)
end
#--------------------------------------------------------------------------
# ● コンティニュー
#--------------------------------------------------------------------------
def continue
SceneManager.call(Scene_Load)
end
#--------------------------------------------------------------------------
# ● シャットダウン
#--------------------------------------------------------------------------
def shutdown
SceneManager.scene.fadeout_all
SceneManager.exit
end
#--------------------------------------------------------------------------
# ● スタートマップ
#--------------------------------------------------------------------------
def startmap
DataManager.setup_startmap
SceneManager.goto(Scene_Map)
end
#--------------------------------------------------------------------------
# ● タイトル
#--------------------------------------------------------------------------
def title
# Scene_Map#pre_title_scene の処理を消してからタイトルへ移動
SceneManager.scene.instance_eval('def pre_title_scene; end')
GameManager.startmap
end
#--------------------------------------------------------------------------
# ●
#--------------------------------------------------------------------------
def first?
return !@executed
end
#--------------------------------------------------------------------------
# ●
#--------------------------------------------------------------------------
def continue?
return DataManager.save_file_exists?
end
end
class Game_Interpreter
#--------------------------------------------------------------------------
# ○ タイトル画面に戻す
#--------------------------------------------------------------------------
alias _cao_startmap_command_354 command_354
def command_354
return _cao_startmap_command_354 if CAO::StartMap::RESET_SKIP
screen.start_fadeout(60)
wait(60)
GameManager.startmap
Fiber.yield
end
end
class Scene_End < Scene_MenuBase
#--------------------------------------------------------------------------
# ○ コマンド[タイトルへ]
#--------------------------------------------------------------------------
alias _cao_startmap_command_to_title command_to_title
def command_to_title
return _cao_startmap_command_to_title if CAO::StartMap::RESET_SKIP
close_command_window
fadeout_all
GameManager.startmap
end
end
class Scene_Gameover < Scene_Base
#--------------------------------------------------------------------------
# ○ タイトル画面へ遷移
#--------------------------------------------------------------------------
alias _cao_startmap_goto_title goto_title
def goto_title
return _cao_startmap_goto_title if CAO::StartMap::RESET_SKIP
fadeout_all
GameManager.startmap
end
end