Class: GamePlay::Save
- Defined in:
- docs/4_Systems_106_Save_Load.rb,
docs/4_Systems_901_GTS.rb
Overview
Save game scene
Constant Summary collapse
- MULTI_SAVE_FORMAT =
MultiSave file format
'%s-%d'
- SAVE_ROOT_PATHS =
List of the usable root path for the save state
['.', ENV['APPDATA'] || Dir.home, Dir.home]
- BEFORE_SAVE_HOOKS =
Returns all the before save hooks.
{game_map: proc {$game_map.begin_save }, encounters_history: proc {$wild_battle.begin_save }}
- AFTER_SAVE_HOOKS =
Returns all the after save hooks.
{game_map: proc {$game_map.end_save }, encounters_history: proc {$wild_battle.end_save }}
Constants inherited from Load
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
Class Attribute Summary collapse
-
.save_index ⇒ Integer
Index of the save file (to allow multi-save).
Instance Attribute Summary collapse
-
#saved ⇒ Boolean
readonly
If the game was saved.
Attributes inherited from Base
#__last_scene, #__result_process, #running, #viewport
Attributes included from DisplayMessage
Class Method Summary collapse
-
.load(filename = nil, no_load_parameter: false) ⇒ PFM::GameState?
Load a game.
-
.save(filename = nil, no_file = false)
Save a game.
-
.save_filename
Get the filename of the current save.
-
.save_root_path
Get the root path of the save for the game.
Instance Method Summary collapse
-
#current_game_state ⇒ GameState?
Return the current GameState object.
- #gts_save_game
-
#initialize ⇒ Save
constructor
Create a new GamePlay::Save.
-
#save_game
Save the game (method allowing hooks on the save).
Methods inherited from Load
#create_new_game, #should_make_new_game?, #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 ⇒ Save
Create a new GamePlay::Save
234 235 |
# File 'docs/4_Systems_106_Save_Load.rb', line 234 def initialize end |
Class Attribute Details
.save_index ⇒ Integer
Returns index of the save file (to allow multi-save).
271 272 273 |
# File 'docs/4_Systems_106_Save_Load.rb', line 271 def save_index @save_index end |
Instance Attribute Details
#saved ⇒ Boolean (readonly)
Returns if the game was saved.
232 233 234 |
# File 'docs/4_Systems_106_Save_Load.rb', line 232 def saved @saved end |
Class Method Details
.load(filename = nil, no_load_parameter: false) ⇒ PFM::GameState?
Change PFM.game_state
Load a game
282 283 |
# File 'docs/4_Systems_106_Save_Load.rb', line 282 def load(filename = nil, no_load_parameter: false) end |
.save(filename = nil, no_file = false)
Save a game
275 276 |
# File 'docs/4_Systems_106_Save_Load.rb', line 275 def save(filename = nil, no_file = false) end |
.save_filename
Get the filename of the current save
288 289 |
# File 'docs/4_Systems_106_Save_Load.rb', line 288 def save_filename end |
.save_root_path
Get the root path of the save for the game
285 286 |
# File 'docs/4_Systems_106_Save_Load.rb', line 285 def save_root_path end |
Instance Method Details
#current_game_state ⇒ GameState?
Return the current GameState object
238 239 |
# File 'docs/4_Systems_106_Save_Load.rb', line 238 def current_game_state end |
#gts_save_game
328 |
# File 'docs/4_Systems_901_GTS.rb', line 328 alias gts_save_game save_game |
#save_game
Save the game (method allowing hooks on the save)
241 242 |
# File 'docs/4_Systems_106_Save_Load.rb', line 241 def save_game end |