class Scene_Title
Velocidade = 15 # MUDE Aqui a velocidade de entrada do menu
Velocidade2 = 20 #MUDE AQUI A VELOCIDADE DE SAIDA DO MENU
def main
if $BTEST
battle_test
return
end
$data_actors = load_data("Data/Actors.rxdata")
$data_classes = load_data("Data/Classes.rxdata")
$data_skills = load_data("Data/Skills.rxdata")
$data_items = load_data("Data/Items.rxdata")
$data_weapons = load_data("Data/Weapons.rxdata")
$data_armors = load_data("Data/Armors.rxdata")
$data_enemies = load_data("Data/Enemies.rxdata")
$data_troops = load_data("Data/Troops.rxdata")
$data_states = load_data("Data/States.rxdata")
$data_animations = load_data("Data/Animations.rxdata")
$data_tilesets = load_data("Data/Tilesets.rxdata")
$data_common_events = load_data("Data/CommonEvents.rxdata")
$data_system = load_data("Data/System.rxdata")
$game_system = Game_System.new
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.title($data_system.title_name)
s1 = "新游戏"
s2 = "继续"
s3 = "退出"
@command_window = Window_Command.new(192, [s1, s2, s3])
@command_window.back_opacity = 160
@command_window.x = 0 - @command_window.width / 2
@command_window.y = 288
@continue_enabled = false
@novo_jogo = false
@sair = false
@mover_janela = true
for i in 0..3
if FileTest.exist?("Save#{i+1}.rxdata")
@continue_enabled = true
end
end
if @continue_enabled
else
@command_window.disable_item(1)
end
$game_system.bgm_play($data_system.title_bgm)
Audio.me_stop
Audio.bgs_stop
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@command_window.dispose
@sprite.bitmap.dispose
@sprite.dispose
end
def mover
if @command_window.x >= 320 - @command_window.width / 2
@mover_janela = false
end
if @mover_janela
@command_window.x += Velocidade
@continue_enable = false
@novo_jogo = false
@sair = false
else
#@command_window.x = 320 - @command_window.width / 2
@continue_enable = true
@novo_jogo = true
@sair = true
end
end
def update
mover
if @pressionado_novo_jogo
@novo_jogo = false
@continue_enable = false
@sair = false
@command_window.x += Velocidade2
@command_window.opacity -= Velocidade2
if @command_window.x >= 700
novojogo2
end
end
if @pressionado_continue
@novo_jogo = false
@continue_enable = false
@sair = false
@command_window.x += Velocidade2
@command_window.opacity -= Velocidade2
if @command_window.x >= 700
continue2
end
end
if @novo_jogo
@command_window.enable_item(0)
else
@command_window.disable_item(0)
end
if @sair
@command_window.enable_item(2)
else
@command_window.disable_item(2)
end
@command_window.update
if Input.trigger?(Input::C)
case @command_window.index
when 0
command_new_game
when 1
command_continue
when 2
command_shutdown
end
end
end
def command_new_game
unless @novo_jogo
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
Audio.bgm_stop
@pressionado_novo_jogo = true
end
def novojogo2
Graphics.frame_count = 0
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
$game_party.setup_starting_members
$game_map.setup($data_system.start_map_id)
$game_player.moveto($data_system.start_x, $data_system.start_y)
$game_player.refresh
$game_map.autoplay
$game_map.update
$scene = Scene_Map.new
end
def command_continue
unless @continue_enabled
$game_system.se_play($data_system.buzzer_se)
return
end
if @continue_enable
@pressionado_continue = true
$game_system.se_play($data_system.decision_se)
else
$game_system.se_play($data_system.buzzer_se)
end
end
def continue2
$scene = Scene_Load.new
end
def command_shutdown
unless @sair
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$scene = nil
end
def battle_test
$data_actors = load_data("Data/BT_Actors.rxdata")
$data_classes = load_data("Data/BT_Classes.rxdata")
$data_skills = load_data("Data/BT_Skills.rxdata")
$data_items = load_data("Data/BT_Items.rxdata")
$data_weapons = load_data("Data/BT_Weapons.rxdata")
$data_armors = load_data("Data/BT_Armors.rxdata")
$data_enemies = load_data("Data/BT_Enemies.rxdata")
$data_troops = load_data("Data/BT_Troops.rxdata")
$data_states = load_data("Data/BT_States.rxdata")
$data_animations = load_data("Data/BT_Animations.rxdata")
$data_tilesets = load_data("Data/BT_Tilesets.rxdata")
$data_common_events = load_data("Data/BT_CommonEvents.rxdata")
$data_system = load_data("Data/BT_System.rxdata")
Graphics.frame_count = 0
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
$game_party.setup_battle_test_members
$game_temp.battle_troop_id = $data_system.test_troop_id
$game_temp.battle_can_escape = true
$game_map.battleback_name = $data_system.battleback_name
$game_system.se_play($data_system.battle_start_se)
$game_system.bgm_play($game_system.battle_bgm)
$scene = Scene_Battle.new
end
end