Class: Scene_Title
- Inherits:
-
GamePlay::BaseCleanUpdate
- Object
- GamePlay::Base
- GamePlay::BaseCleanUpdate
- Scene_Title
- Defined in:
- scripts/01450 Systems/00001 Title/00002 Scene_Title.rb,
scripts/01450 Systems/00001 Title/00003 Actions.rb,
scripts/01450 Systems/00001 Title/00010 Splashes.rb,
scripts/01450 Systems/00001 Title/00004 IntroMovie.rb,
scripts/01450 Systems/00001 Title/00020 Title Animation.rb
Overview
Due to how Scene_Title is designed, create_graphics will not be overloaded so the default viewport will be created and other required graphics will be initialized / disposed when needed
Scene responsive of showing the title of the game
It's being the first scene called when starting game without specific arguments. It's also the scene that gets called when the game soft resets.
Constant Summary
Constants inherited from GamePlay::BaseCleanUpdate
GamePlay::BaseCleanUpdate::AIU_KEY2METHOD
Constants inherited from GamePlay::Base
GamePlay::Base::DEFAULT_TRANSITION, GamePlay::Base::DEFAULT_TRANSITION_PARAMETER
Constants included from Input
Input::ALIAS_KEYS, Input::AXIS_MAPPING, Input::AXIS_SENSITIVITY, Input::DEAD_ZONE, Input::Keyboard, Input::Keys, Input::NON_TRIGGER_ZONE, Input::REPEAT_COOLDOWN, Input::REPEAT_SPACE
Constants included from GamePlay::DisplayMessage
GamePlay::DisplayMessage::MESSAGE_ERROR, GamePlay::DisplayMessage::MESSAGE_PROCESS_ERROR
Instance Attribute Summary
Attributes inherited from GamePlay::Base
#__last_scene, #__result_process, #running, #viewport
Attributes included from GamePlay::DisplayMessage
Instance Method Summary collapse
-
#initialize ⇒ Scene_Title
constructor
Create a new Scene_Title.
-
#update_graphics
Update the graphics.
-
#update_inputs
Update the input of the scene.
-
#update_mouse
Update the mouse.
Methods inherited from GamePlay::BaseCleanUpdate
#automatic_input_update, #update
Methods inherited from GamePlay::Base
#add_disposable, #call_scene, #dispose, #find_parent, #main, #return_to_scene, #snap_to_bitmap, #update, #visible, #visible=
Methods included from Input
dir4, dir8, get_text, joy_axis_position, press?, register_events, released?, repeat?, swap_states, trigger?
Methods included from GamePlay::DisplayMessage
#can_display_message_be_called?, #close_message_window, #display_message, #display_message_and_wait, #message_class, #message_processing?, #message_visible, #message_visible=
Constructor Details
#initialize ⇒ Scene_Title
Create a new Scene_Title
10 11 12 13 14 15 16 17 18 19 |
# File 'scripts/01450 Systems/00001 Title/00002 Scene_Title.rb', line 10 def initialize data_load super(true) @current_state = :psdk_splash_initialize @current_state = :action_play_game if debug? && ARGV.include?('skip_title') @splash_counter = 0 @bgm_duration = Configs.scene_title_config.bgm_duration @movie_map_id = Configs.scene_title_config.intro_movie_map_id || 0 Audio.bgm_stop end |
Instance Method Details
#update_graphics
Update the graphics
49 50 51 52 |
# File 'scripts/01450 Systems/00001 Title/00002 Scene_Title.rb', line 49 def update_graphics @splash_animation&.update @title_controls&.update end |
#update_inputs
Update the input of the scene
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'scripts/01450 Systems/00001 Title/00002 Scene_Title.rb', line 22 def update_inputs return false unless !@splash_animation || @splash_animation.done? return false unless !@title_controls || @title_controls.done? if @current_state != :title_animation send(@current_state) return false elsif @bgm_duration && Audio.bgm_position >= @bgm_duration @running = false $scene = Scene_Title.new return false end if Input.trigger?(:A) action_a elsif Input.trigger?(:UP) action_up elsif Input.trigger?(:DOWN) action_down else return true end return false end |
#update_mouse
Update the mouse
55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'scripts/01450 Systems/00001 Title/00002 Scene_Title.rb', line 55 def update_mouse(*) return unless @title_controls if @title_controls.index == 1 && @title_controls.play_bg.mouse_in? play_cursor_se @title_controls.index = 0 elsif @title_controls.index == 0 && @title_controls.credit_bg.mouse_in? play_cursor_se @title_controls.index = 1 elsif Mouse.trigger?(:LEFT) action_a if @title_controls.play_bg.mouse_in? || @title_controls.credit_bg.mouse_in? end end |