Loading...
Searching...
No Matches
CityBuilderTown.TownProvisionAction Class Reference

Detailed Description

action that provisions a TownHomeComponent with a type of item like food or wood
which item that is, as well as the giver and the path to take, has to be provided
the action reserves the items quantity in the giver and the needed capacity in the home

Inheritance diagram for CityBuilderTown.TownProvisionAction:
CityBuilderCore.WalkerAction

Public Member Functions

 TownProvisionAction (TownWalker walker, TownHomeComponent home, IItemGiver giver, WalkingPath walkingPath, Item item, bool isHome)
 
override 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
 
override void Continue (Walker walker)
 called by the walker after the game has been loaded
 
override void Cancel (Walker walker)
 called by the walker if the action was active when its process was canceled
 
override 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
 
void Arrive (Walker walker)
 
void OnBeforeSerialize ()
 
void OnAfterDeserialize ()
 

Public Attributes

bool _isHome
 
bool _isReturning
 

Member Function Documentation

◆ Cancel()

override void CityBuilderTown.TownProvisionAction.Cancel ( Walker walker)
inlinevirtual

called by the walker if the action was active when its process was canceled

Parameters
walkerthe walker performing this action

Reimplemented from CityBuilderCore.WalkerAction.

◆ Continue()

override void CityBuilderTown.TownProvisionAction.Continue ( Walker walker)
inlinevirtual

called by the walker after the game has been loaded

Parameters
walkerthe walker performing this action

Reimplemented from CityBuilderCore.WalkerAction.

◆ End()

override void CityBuilderTown.TownProvisionAction.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 from CityBuilderCore.WalkerAction.

◆ Start()

override void CityBuilderTown.TownProvisionAction.Start ( Walker walker)
inlinevirtual

called by the walker when the action is first started, either by being first in a process or when the previous action has ended

Parameters
walkerthe walker performing this action

Reimplemented from CityBuilderCore.WalkerAction.