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

Detailed Description

encapsulated action a walker can perform, started as part of a ProcessState in Walker.StartProcess(WalkerAction[], string)
this enables easier higher level walker control, the walker no longer has to directly hold all the state of the different actions it can perform
instead it can just start a process that does multiple things in series(walk somewhere>pick up item>walk back>deposit item)
these are directly serialized, if they contain state that is not directly serializable use ISerializationCallbackReceiver

Inheritance diagram for CityBuilderCore.WalkerAction:
CityBuilderCore.AnimatedActionBase CityBuilderCore.GiveItemsAction CityBuilderCore.ItemsGiverAction CityBuilderCore.ItemsReceiverAction CityBuilderCore.MessageAction CityBuilderCore.ReceiveItemsAction CityBuilderCore.RoamAction CityBuilderCore.RoamActionTyped CityBuilderCore.TakeItemsAction CityBuilderCore.WaitAction CityBuilderCore.WalkBuildingAction CityBuilderCore.WalkPathAction CityBuilderCore.WalkPointAction CityBuilderCore.WalkPointActionTyped CityBuilderTown.TownProvisionAction CityBuilderTown.TownRecoveryAction CityBuilderTown.TownSignalAction

Public Member Functions

virtual void Start (Walker walker)
 called by the walker when the action is first started, either by being first in a process or when the previous action has ended
 
virtual void Continue (Walker walker)
 called by the walker after the game has been loaded
 
virtual void Cancel (Walker walker)
 called by the walker if the action was active when its process was canceled
 
virtual void End (Walker walker)
 called by the walker when this is the active action and the process advances
do not call this directly, to end an action call Walker.AdvanceProcess
 

Member Function Documentation

◆ Cancel()

◆ Continue()

◆ End()

virtual void CityBuilderCore.WalkerAction.End ( Walker walker)
inlinevirtual

called by the walker when this is the active action and the process advances
do not call this directly, to end an action call Walker.AdvanceProcess

Parameters
walker

Reimplemented in CityBuilderCore.AnimatedActionBase, CityBuilderCore.ItemsGiverAction, CityBuilderCore.ItemsReceiverAction, CityBuilderCore.WaitAnimatedAction, and CityBuilderTown.TownProvisionAction.

◆ Start()