Loading...
Searching...
No Matches
PixelCrushers.QuestMachine.SpawnedEntity Class Reference

This helper component invokes a delegate method when disabled. More...

Inheritance diagram for PixelCrushers.QuestMachine.SpawnedEntity:
Collaboration diagram for PixelCrushers.QuestMachine.SpawnedEntity:

Public Member Functions

delegate void SpawnedObjectDelegate (SpawnedEntity spawnedEntity)
 
override void OnDisable ()
 
override string RecordData ()
 
override void ApplyData (string s)
 
- Public Member Functions inherited from PixelCrushers.Saver
virtual void Awake ()
 
virtual void Start ()
 
virtual void Reset ()
 
virtual void OnEnable ()
 
virtual void OnDestroy ()
 
string RecordData ()
 This method should return a string that represents the data you want to save.
 
void ApplyData (string s)
 This method should process the string representation of saved data and apply it to the current state of the game.
 
virtual void ApplyDataImmediate ()
 If the Saver needs to pull data from the Save System immediately after loading a scene, instead of waiting for ApplyData to be called at it its normal time, it can implement this method.
 
virtual void OnBeforeSceneChange ()
 The Save System will call this method before scene changes.
 
virtual void OnRestartGame ()
 The Save System will call this method when restarting the game.
 

Properties

string spawnerName [get, set]
 
- Properties inherited from PixelCrushers.Saver
bool appendSaverTypeToKey [get, set]
 Append the name of this saver type to the key.
 
virtual string key [get, set]
 Save data under this key.
 
string _internalKeyValue [get, set]
 Accesses the internal key value.
 
virtual bool saveAcrossSceneChanges [get, set]
 Save when changing scenes to be able to restore saved state when returning to scene.
 
virtual bool restoreStateOnStart [get, set]
 

Events

SpawnedObjectDelegate disabled = delegate { }
 

Additional Inherited Members

- Protected Attributes inherited from PixelCrushers.Saver
string m_runtimeKey = null
 

Detailed Description

This helper component invokes a delegate method when disabled.

Spawners work with SpawnedEntity instead of the Pixel Crushers common library SpawnedObject because they handle handle spawning differently from SpawnedObjectManager.

If the object also has a SpawnedObject component, when restored it will also register itself with its original Spawner if present.

Member Function Documentation

◆ ApplyData()

override void PixelCrushers.QuestMachine.SpawnedEntity.ApplyData ( string  s)
inline

◆ OnDisable()

override void PixelCrushers.QuestMachine.SpawnedEntity.OnDisable ( )
inlinevirtual

Reimplemented from PixelCrushers.Saver.

◆ RecordData()

override string PixelCrushers.QuestMachine.SpawnedEntity.RecordData ( )
inline

◆ SpawnedObjectDelegate()

delegate void PixelCrushers.QuestMachine.SpawnedEntity.SpawnedObjectDelegate ( SpawnedEntity  spawnedEntity)

Property Documentation

◆ spawnerName

string PixelCrushers.QuestMachine.SpawnedEntity.spawnerName
getset

Event Documentation

◆ disabled

SpawnedObjectDelegate PixelCrushers.QuestMachine.SpawnedEntity.disabled = delegate { }

The documentation for this class was generated from the following file: