Skip to content
EvilEngine.Api.Agents

IBrain interface

public interface IBrain

What thinks for one agent. The engine calls it at the agent record’s think interval, 0.1 s unless the record says otherwise, in the session’s think phase on the server’s thread, and spreads agents on the same interval over its ticks.

sealed class Wanderer : IBrain
{
    public void Think(IAgent agent)
    {
        if (agent.Motion != AgentMotion.Moving)
            agent.MoveTo(agent.Feet with { X = agent.Feet.X + 5 });
    }
}
Assembly
EvilEngine.Api
Commit
4ff877b1

Members

Think method

void Think(IAgent agent)

Reads the agent and sets what it wants: a goal with MoveTo, a facing with Face, or a raw command. Locomotion turns that into the body’s movement every tick between thinks. A brain that throws is dropped, with a note, and its body stands idle.