helper class for Walker that hold the current status when the walker is following a WalkingPath
|
| WalkingState (WalkingPath walkingPath) |
|
void | Recalculated (WalkingPath walkingPath) |
| replaces the current path with another one and resets the index so it is followed from its start
happens in the defense demo when new obstacles are placed that may interfere with the walker
|
|
void | Cancel () |
| requests for the walking to be canceled, it might not end immediately but at the next possible point
|
|
WalkingData | GetData () |
|
|
WalkingPath | WalkingPath [get] |
| the walking path the walker is currently following
|
|
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
|
|
int | Index [get, set] |
| index of the point in the path the walker has last visited
|
|
bool | IsCanceled [get] |
| whether the walking has been canceled
|
|
◆ Recalculated()
void CityBuilderCore.WalkingState.Recalculated |
( |
WalkingPath | walkingPath | ) |
|
|
inline |
replaces the current path with another one and resets the index so it is followed from its start
happens in the defense demo when new obstacles are placed that may interfere with the walker
- Parameters
-
walkingPath | the new path that will be followed instead of the current one |