-
Notifications
You must be signed in to change notification settings - Fork 8
VersionedDataStruct
It is recommended to use this class as parent for all structs, that will be part of your SaveGame.
Under the hood, this class silently registers a Broadcast receiver, which listens to Raptor-internal broadcasts, namely the Savegame Broadcasts.
When a game is loaded, the broadcast is caught and the Savegame Versioning is triggered. In addition, this class offers an on_game_loaded callback, which gets invoked, when this struct has been loaded from a savegame, thus offering the same (or similar) functionality as you find in The Saveable Object's User Event 15. You may react on the loading of a game from within a data struct! That's great, isn't it?
function MyDataClass : VersionedDataStruct {
name = "";
someother_var = "";
on_game_loaded = function() {
// if loaded from a game, this gets called
}
}This class is also the base class for the Versioned DataBuilders, as describen in DataBuilder.
Raptor free: Animation ● StateMachine ● Files(Sync) ● Macros ● Logger ● Controllers ● LG Localization ● Particle Effects ● Tools, other Objects and Helpers
Raptor pro: RACE (The Random Content Engine) ● Savegame System ● UI Subsystem ● Shaders ● Files(Async) ● RichJson ● Scriptor
Back to Repo ● Wiki Home ● Copyright © coldrock.games
- Home
- Working with raptor
- Create a Game
- raptor's object model
- Macros
- Logger
- Controllers
- StateMachine
- Animation
- Particle Effects
- LG Localization
- Interfaces
- Tools, other Objects and Helpers
Raptor Pro Modules