Files
LonaRPG-Online-Games/Data/Scripts/Frames/113_Scene_End.rb
T
2026-10-29 21:59:06 +04:00

68 lines
2.7 KiB
Ruby

#==============================================================================
# This script has been altered by Kslander for the need of LonaRPG
#==============================================================================
#==============================================================================
# ** Scene_End
#------------------------------------------------------------------------------
# This class performs game over screen processing.
#==============================================================================
class Scene_End < Scene_MenuBase
#--------------------------------------------------------------------------
# * Start Processing
#--------------------------------------------------------------------------
def start
super
create_command_window
end
#--------------------------------------------------------------------------
# * Pre-Termination Processing
#--------------------------------------------------------------------------
def pre_terminate
super
close_command_window
end
#--------------------------------------------------------------------------
# * Create Background
#--------------------------------------------------------------------------
def create_background
super
@background_sprite.tone.set(0, 0, 0, 128)
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_command_window
@command_window = Window_GameEnd.new
@command_window.set_handler(:to_title, method(:command_to_title))
@command_window.set_handler(:shutdown, method(:command_shutdown))
@command_window.set_handler(:cancel, method(:return_scene))
end
#--------------------------------------------------------------------------
# * Close Command Window
#--------------------------------------------------------------------------
def close_command_window
@command_window.close
update until @command_window.close?
end
#--------------------------------------------------------------------------
# * [Go to Title] Command
#--------------------------------------------------------------------------
def command_to_title
close_command_window
p "disposing"
$game_portraits.dispose_portraits
Cache.clear
fadeout_all
SceneManager.goto(Scene_Title)
end
#--------------------------------------------------------------------------
# * [Shut Down] Command
#--------------------------------------------------------------------------
def command_shutdown
close_command_window
fadeout_all
SceneManager.exit
end
end