Loading...
Searching...
No Matches
CityBuilderCore.WalkerAddon Class Referenceabstract

Detailed Description

temporary objects that are added(Walker.AddAddon<T>(T)) and removed(Walker.RemoveAddon(WalkerAddon)) at runtime
can be used for effects, statuses, animations, ...

https://citybuilder.softleitner.com/manual/walkers

Inheritance diagram for CityBuilderCore.WalkerAddon:
CityBuilderCore.KeyedBehaviour CityBuilderCore.ISaveData CityBuilderCore.IKeyed CityBuilderCore.AttackSlowAddon CityBuilderCore.WalkerAddonEffect CityBuilderCore.WalkerAddonMaterial

Public Member Functions

virtual void Awake ()
 
virtual void Start ()
 
virtual void Update ()
 
void Remove ()
 Removes the addon from the walker it is located on
this will usually result in the termination of the addon.
 
virtual void InitializeAddon ()
 called by the walker after the addon has been instantiated and Walker has been set
 
virtual void TerminateAddon ()
 called by the walker when the addon gets removed
this should usually terminate the addon(mark as terminated and Destroy)
 
virtual string SaveData ()
 serializes the objects state(usually to json) and returns it
 
virtual void LoadData (string json)
 deserializes the serialized json data and loads the data as its new state
 

Public Attributes

BuildingAddon.AddonAccumulationMode Accumulation
 
bool Save
 
- Public Attributes inherited from CityBuilderCore.KeyedBehaviour
string Key
 

Protected Attributes

bool _isTerminated
 

Properties

Walker Walker [get, set]
 
- Properties inherited from CityBuilderCore.IKeyed

Member Function Documentation

◆ InitializeAddon()

virtual void CityBuilderCore.WalkerAddon.InitializeAddon ( )
inlinevirtual

called by the walker after the addon has been instantiated and Walker has been set

Reimplemented in CityBuilderCore.AttackSlowAddon, and CityBuilderCore.WalkerAddonMaterial.

◆ LoadData()

virtual void CityBuilderCore.WalkerAddon.LoadData ( string json)
inlinevirtual

deserializes the serialized json data and loads the data as its new state

Parameters
json

Implements CityBuilderCore.ISaveData.

Reimplemented in CityBuilderCore.AttackSlowAddon.

◆ SaveData()

virtual string CityBuilderCore.WalkerAddon.SaveData ( )
virtual

serializes the objects state(usually to json) and returns it

Returns
serialized save data

Implements CityBuilderCore.ISaveData.

Reimplemented in CityBuilderCore.AttackSlowAddon.

◆ TerminateAddon()

virtual void CityBuilderCore.WalkerAddon.TerminateAddon ( )
inlinevirtual

called by the walker when the addon gets removed
this should usually terminate the addon(mark as terminated and Destroy)

Reimplemented in CityBuilderCore.AttackSlowAddon, and CityBuilderCore.WalkerAddonMaterial.