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

Detailed Description

helper class for Walker that hold the current status of its roaming
roaming is a special kind of randomly walking around which memorizes and avoids the points it has already been to

Classes

class  RoamingData
 

Public Member Functions

void Cancel ()
 requests for the roaming to be canceled, it might not end immediately but at the next possible point
 
RoamingData GetData ()
 

Static Public Member Functions

static RoamingState FromData (RoamingData data)
 

Properties

int Steps [get, set]
 how many steps the walker has taken while roaming, roaming ends when the steps exceed the range(RoamingWalker.Range)
 
float Moved [get, set]
 how far the walker has moved within the current step, used to calculate the actual position of the walker by interpolating between the last and next point
 
Vector2Int Current [get, set]
 last point the walker has reached
 
Vector2Int Next [get, set]
 point the walker is currently going to
 
List< Vector2Int > Memory [get, set]
 this is where already visited points are stored so they can be avoided in the future, the walker dictates how long that memory is(for example RoamingWalker.Memory)
 
bool IsCanceled [get]
 whether the roaming has been canceled