Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #===============================================================================
- # The Last Oni Title Screen
- #===============================================================================
- module Title_screen
- #===============================================================================
- # Logo customization
- #===============================================================================
- Logo_Enable = false
- #==============================================================================
- Filename = [
- Logo_Background = "",
- Main_Background = ""
- ]
- end
- class Scene_Title
- include Title_screen
- #--------------------------------------------------------------------------
- # * Overwrite start
- #--------------------------------------------------------------------------
- def start
- super
- execute_logo if Logo_Enable
- create_sprites
- create_command_window
- play_title_music
- end
- def execute_logo
- create_back
- create_logo rescue nil
- play_Me rescue nil
- create_character rescue nil
- execute_voice rescue nil
- end
- def create_back
- @logo_background = Plane.new
- @logo_background.bitmap = Cache.title1(Filename[0].to_s)
- end
- def create_sprites
- create_main_background
- create_title rescue nil
- create_particles rescue nil
- end
- def create_main_background
- @logo_background = Plane.new
- @logo_background.bitmap = Cache.title1(Filename[1].to_s)
- end
- ##############################################################################
- def transition_speed
- return 20
- end
- #--------------------------------------------------------------------------
- # * Termination Processing
- #--------------------------------------------------------------------------
- def terminate
- super
- SceneManager.snapshot_for_background
- end
- #--------------------------------------------------------------------------
- # * Move Sprite to Screen Center
- #--------------------------------------------------------------------------
- def center_sprite(sprite)
- sprite.ox = sprite.bitmap.width / 2
- sprite.oy = sprite.bitmap.height / 2
- sprite.x = Graphics.width / 2
- sprite.y = Graphics.height / 2
- end
- #--------------------------------------------------------------------------
- # * Create Command Window
- #--------------------------------------------------------------------------
- def create_command_window
- @command_window = Window_TitleCommand.new
- @command_window.set_handler(:new_game, method(:command_new_game))
- @command_window.set_handler(:continue, method(:command_continue))
- @command_window.set_handler(:shutdown, method(:command_shutdown))
- end
- #--------------------------------------------------------------------------
- # * Close Command Window
- #--------------------------------------------------------------------------
- def close_command_window
- @command_window.close
- update until @command_window.close?
- end
- #--------------------------------------------------------------------------
- # * [New Game] Command
- #--------------------------------------------------------------------------
- def command_new_game
- DataManager.setup_new_game
- close_command_window
- fadeout_all
- $game_map.autoplay
- SceneManager.goto(Scene_Map)
- end
- #--------------------------------------------------------------------------
- # * [Continue] Command
- #--------------------------------------------------------------------------
- def command_continue
- close_command_window
- SceneManager.call(Scene_Load)
- end
- #--------------------------------------------------------------------------
- # * [Shut Down] Command
- #--------------------------------------------------------------------------
- def command_shutdown
- close_command_window
- fadeout_all
- SceneManager.exit
- end
- #--------------------------------------------------------------------------
- # * Play Title Screen Music
- #--------------------------------------------------------------------------
- def play_title_music
- $data_system.title_bgm.play
- RPG::BGS.stop
- RPG::ME.stop
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement