Loading...
Searching...
No Matches
CityBuilderCore.AttackSlowAddon Class Reference

Detailed Description

walker addon that slows down the attack walker it is attached to
the speed calculation itself is done in the attack walker
the addon just carries the factor and removes itself after a set duration

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

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

Classes

class  SlowData
 

Public Member Functions

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

Public Attributes

float Factor = 0.5f
 
float Duration = 2f
 
- Public Attributes inherited from CityBuilderCore.WalkerAddon
BuildingAddon.AddonAccumulationMode Accumulation
 
bool Save
 
- Public Attributes inherited from CityBuilderCore.KeyedBehaviour
string Key
 

Additional Inherited Members

- Protected Attributes inherited from CityBuilderCore.WalkerAddon
bool _isTerminated
 
- Properties inherited from CityBuilderCore.WalkerAddon
Walker Walker [get, set]
 
- Properties inherited from CityBuilderCore.IKeyed

Member Function Documentation

◆ InitializeAddon()

override void CityBuilderCore.AttackSlowAddon.InitializeAddon ( )
inlinevirtual

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

Reimplemented from CityBuilderCore.WalkerAddon.

◆ LoadData()

override void CityBuilderCore.AttackSlowAddon.LoadData ( string json)
inlinevirtual

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

Parameters
json

Reimplemented from CityBuilderCore.WalkerAddon.

◆ SaveData()

override string CityBuilderCore.AttackSlowAddon.SaveData ( )
inlinevirtual

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

Returns
serialized save data

Reimplemented from CityBuilderCore.WalkerAddon.

◆ TerminateAddon()

override void CityBuilderCore.AttackSlowAddon.TerminateAddon ( )
inlinevirtual

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

Reimplemented from CityBuilderCore.WalkerAddon.

◆ Update()

override void CityBuilderCore.AttackSlowAddon.Update ( )
inlinevirtual

Reimplemented from CityBuilderCore.WalkerAddon.