A class in Root.Township, Alta.Intelligence.
Action where an agent eats its target: it interacts with it, waits Delay, then destroys it. With IsImmediate the target is destroyed at once.
Constructors
| Member | What it is |
|---|
ActiveEat() | Creates an ActiveEat with default values. |
Fields
1 private and internal field
| Member | What it is |
|---|
private Timeline.IEntry entry | The scheduled Consume call on the timeline, so it can be cancelled. |
Methods
| Member | What it is |
|---|
override void Update(bool hasTarget) | Cancels if the target is lost. |
protected override void OnStart() | Destroys the target at once if immediate, else starts interacting and schedules Consume. |
2 private and internal methods
| Member | What it is |
|---|
private void Cancel(Interactor interactor, Interactable interactable) | Called when the interaction ends early; cancels the pending eat and the action. |
private void Consume() | Destroys the thing being eaten and finishes the action. |