#==============================================================================
# ** Scene_Travel
#------------------------------------------------------------------------------
# This class performs travel screen processing.
#==============================================================================
class Scene_Travel
def main
# Make command window
s1 = "Sa'ar"
s2 = "Capital City"
s3 = "Cancel"
@command_window = Window_Command.new(192, [s1, s2, s3])
@command_window.x = 320 - @command_window.width / 2
@command_window.y = 240 - @command_window.height / 2
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame Update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of window
@command_window.dispose
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update command window
@command_window.update
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to menu screen
$scene = Scene_Menu.new(2)
return
end
# If C button was pressed
if Input.trigger?(Input::C)
# Branch by command window cursor position
case @command_window.index
when 0
command_to_Saar
when 1
command_capital
when 2
command_cancel
end
return
end
end
#--------------------------------------------------------------------------
# * Process When Choosing [To saar] Command
#--------------------------------------------------------------------------
def command_to_Saar
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Set transferring player flag
$game_temp.player_transferring = true
# appointment method is [direct appointment]
# Set player move destination
$game_temp.player_new_map_id = 8
$game_temp.player_new_x = 55
$game_temp.player_new_y = 42
$game_temp.player_new_direction = 2
# If fade is set. If you want to use 'fade'
# Prepare for transition
Graphics.freeze
# Set transition processing flag
$game_temp.transition_processing = true
$game_temp.transition_name = ""
end
#--------------------------------------------------------------------------
# * Process When Choosing [to capital] Command
#--------------------------------------------------------------------------
def command_capital
end
#--------------------------------------------------------------------------
# * Process When Choosing [Cancel] Command
#--------------------------------------------------------------------------
def command_cancel
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to menu screen
$scene = Scene_Map.new
end
end