Skip to main content

AgentEatSettings

A class in Root.Township, Alta.Intelligence.

Settings for ActiveEat: grab the target item with the creature's Interactor and destroy it after a delay. Server only; used for creatures that eat dropped food.

Constructors​

MemberWhat it is
AgentEatSettings()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

2 private and internal fields
MemberWhat it is
private float delayBacking field for Delay (default 0.1).
private bool isImmediateBacking field for IsImmediate.

Properties​

MemberWhat it is
float Delay { get; }Seconds between grabbing the item and destroying it.
bool IsImmediate { get; }If true, the target item is destroyed at once without being grabbed, and the action then cancels itself.

Methods​

MemberWhat it is
protected override IAction GetAction()Builds the shared ActiveEat action for agents that implement IInteractAgent, using a target.