![]() |
Platformer Pro
2.3.2
A platform game kit for Unity.
|
Component to attach to an object if you wish its state to be saved. More...
Public Member Functions | |
void | SetPersistenceState (bool state) |
Sets the persistence state. More... | |
void | SetPersistenceState (bool state, string extraPersistenceData) |
Sets the persistence state, overriding extra persistence data More... | |
![]() | |
virtual void | Validate (PlatformerProMonoBehaviour myTarget) |
Override this method if you want to provide custom validation. The actual code should be surrounded by the if UNITY_EDITOR / endif directive. More... | |
Public Attributes | |
bool | enablePersistence |
Should we enable persistence? More... | |
string | guid = System.Guid.NewGuid().ToString() |
Unique ID for this object. You shoulnd't need to edit this, use editor debug mode if you must. More... | |
GameObject | target |
GameObject to apply persitence settings to, defaults to self. More... | |
PersistableObjectType | persistenceImplementation |
How do we implement the persistence settings. More... | |
bool | defaultStateIsDisabled |
If true then the obejct starts disabled. More... | |
string | spawnedObjectName |
If this item was spawned then save the name of the prefab here. More... | |
Protected Member Functions | |
virtual void | PostInit () |
Init this instance. More... | |
virtual void | SetPersistenceDefaults () |
Sets the persistence defaults. More... | |
virtual void | ProcessState () |
Processes the persisted state. More... | |
virtual void | ApplyExtraPersistenceData (PersistableObjectData data) |
Apply any extra data. This differs from custom persistence, as custom persistence must control both data and ctivation state. More... | |
virtual void | ApplyCustomPersistence (PersistableObjectData data) |
Custom persistable implementation. Override to customise. More... | |
Properties | |
virtual string | ExtraPersistenceData [get] |
Gets the extra persistence data. More... | |
![]() | |
virtual string | Header [get] |
Gets the header string used to describe the component. More... | |
virtual string | DocLink [get] |
Gets a link to documentation site. More... | |
virtual string | VideoLink [get] |
Gets a link to a youtube video. More... | |
virtual string | Deprecated [get] |
If non-null this component is deprecated. The string shows a message indicating how it should be replaced. More... | |
Component to attach to an object if you wish its state to be saved.
|
protectedvirtual |
Custom persistable implementation. Override to customise.
data | Data. |
Reimplemented in PlatformerPro.Trigger, PlatformerPro.SpawnOnHeadbutt, PlatformerPro.Platform, PlatformerPro.Door, PlatformerPro.RespawnPoint, and PlatformerPro.Enemy.
|
protectedvirtual |
Apply any extra data. This differs from custom persistence, as custom persistence must control both data and ctivation state.
data | Data. |
Reimplemented in PlatformerPro.Item.
|
protectedvirtual |
Init this instance.
Reimplemented in PlatformerPro.WaypointMoverPlatform, PlatformerPro.UpAndDownPlatformWithReturn, PlatformerPro.UpAndDownPlatform, PlatformerPro.Trigger, PlatformerPro.TimerTrigger, PlatformerPro.ProximityTrigger, PlatformerPro.OneWayTrigger, PlatformerPro.ConditionTrigger, PlatformerPro.TriggerPlatform, PlatformerPro.Stairs, PlatformerPro.SpringboardPlatform, PlatformerPro.SpawnOnHeadbutt, PlatformerPro.RotatingPlatform, PlatformerPro.RisingDoor, PlatformerPro.RailPlatform, PlatformerPro.Platform, PlatformerPro.HorizontalSpringboardPlatform, PlatformerPro.FallingPlatform, PlatformerPro.EnemySpringBoard, PlatformerPro.ElevatorPlatform, PlatformerPro.Door, PlatformerPro.DestructiblePlatform, PlatformerPro.DestroyOnStandPlatform, PlatformerPro.DestroyOnHeadbutt, PlatformerPro.CrumblingPlatform, PlatformerPro.ConveyerPlatform, PlatformerPro.BackAndForthPlatform, PlatformerPro.Item, PlatformerPro.RespawnPoint, PlatformerPro.StompOnHead, PlatformerPro.SequenceDrivenEnemy, PlatformerPro.RotatingEnemy, and PlatformerPro.Enemy.
|
protectedvirtual |
Processes the persisted state.
|
protectedvirtual |
Sets the persistence defaults.
Reimplemented in PlatformerPro.Door, PlatformerPro.Item, PlatformerPro.RespawnPoint, and PlatformerPro.Enemy.
void PlatformerPro.PersistableObject.SetPersistenceState | ( | bool | state | ) |
Sets the persistence state.
state | State to set. |
void PlatformerPro.PersistableObject.SetPersistenceState | ( | bool | state, |
string | extraPersistenceData | ||
) |
Sets the persistence state, overriding extra persistence data
state | State to set. |
bool PlatformerPro.PersistableObject.defaultStateIsDisabled |
If true then the obejct starts disabled.
bool PlatformerPro.PersistableObject.enablePersistence |
Should we enable persistence?
string PlatformerPro.PersistableObject.guid = System.Guid.NewGuid().ToString() |
Unique ID for this object. You shoulnd't need to edit this, use editor debug mode if you must.
PersistableObjectType PlatformerPro.PersistableObject.persistenceImplementation |
How do we implement the persistence settings.
string PlatformerPro.PersistableObject.spawnedObjectName |
If this item was spawned then save the name of the prefab here.
GameObject PlatformerPro.PersistableObject.target |
GameObject to apply persitence settings to, defaults to self.
|
getprotected |
Gets the extra persistence data.
The extra persistence data.