Class: GamePlay::Load
- Inherits:
-
BaseCleanUpdate
- Object
- Base
- BaseCleanUpdate
- GamePlay::Load
- Defined in:
- scripts/01450 Systems/00106 Save Load/00003 GamePlay/00200 Load.rb,
scripts/01450 Systems/00106 Save Load/00003 GamePlay/00202 Load input.rb,
scripts/01450 Systems/00106 Save Load/00003 GamePlay/00203 Load logic.rb,
scripts/01450 Systems/00106 Save Load/00003 GamePlay/00201 Load load_all_saves.rb
Overview
Load game scene
Direct Known Subclasses
Constant Summary collapse
- ACTIONS =
CTRL button actions
%i[action_a action_a action_a action_b]
Constants inherited from BaseCleanUpdate
BaseCleanUpdate::AIU_KEY2METHOD
Constants inherited from Base
Base::DEFAULT_TRANSITION, 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 DisplayMessage
DisplayMessage::MESSAGE_ERROR, DisplayMessage::MESSAGE_PROCESS_ERROR
Instance Attribute Summary
Attributes inherited from Base
#__last_scene, #__result_process, #running, #viewport
Attributes included from DisplayMessage
Instance Method Summary collapse
-
#create_new_game
Create a new game and start it.
-
#initialize ⇒ Load
constructor
Create a new GamePlay::Load scene.
-
#should_make_new_game? ⇒ Boolean
Tell if the Title should automatically create a new game instead.
- #update_graphics
- #update_inputs
- #update_mouse
Methods inherited from BaseCleanUpdate
#automatic_input_update, #update
Methods inherited from 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 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 ⇒ Load
Create a new GamePlay::Load scene
5 6 7 8 9 10 11 12 13 |
# File 'scripts/01450 Systems/00106 Save Load/00003 GamePlay/00200 Load.rb', line 5 def initialize super() Studio::Text.load @running = true @index = 0 @all_saves = load_all_saves @all_saves.clear if @all_saves.size == 1 && @all_saves.first.nil? @mode = :waiting_input end |
Instance Method Details
#create_new_game
Create a new game and start it
4 5 6 7 8 9 10 11 12 |
# File 'scripts/01450 Systems/00106 Save Load/00003 GamePlay/00203 Load logic.rb', line 4 def create_new_game create_new_party PFM.game_state. PFM.game_state.load_parameters $trainer.redefine_var $scene = Scene_Map.new Yuki::TJN.force_update_tone @running = false end |
#should_make_new_game? ⇒ Boolean
Tell if the Title should automatically create a new game instead
22 23 24 |
# File 'scripts/01450 Systems/00106 Save Load/00003 GamePlay/00200 Load.rb', line 22 def should_make_new_game? @all_saves.empty? end |
#update_graphics
15 16 17 18 |
# File 'scripts/01450 Systems/00106 Save Load/00003 GamePlay/00200 Load.rb', line 15 def update_graphics @base_ui&.update_background_animation @signs.each(&:update) end |
#update_inputs
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'scripts/01450 Systems/00106 Save Load/00003 GamePlay/00202 Load input.rb', line 6 def update_inputs return false unless @signs.first.done? rotate_signs if @mode == :rotating if Input.trigger?(:A) action_a elsif Input.trigger?(:B) action_b elsif Input.repeat?(:LEFT) action_left elsif Input.repeat?(:RIGHT) action_right end end |
#update_mouse
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'scripts/01450 Systems/00106 Save Load/00003 GamePlay/00202 Load input.rb', line 21 def update_mouse(*) if Mouse.wheel_delta > 0 action_left elsif Mouse.wheel_delta < 0 action_right elsif Mouse.trigger?(:LEFT) && @signs[1].simple_mouse_in? action_a elsif Mouse.trigger?(:RIGHT) action_b else (@base_ui.ctrl, ACTIONS) return end Mouse.wheel = 0 end |