Class EnemyMovement

Namespace
SurvivorsMaker.Simulation
Assembly
SurvivorsMaker.Simulation.dll

Base movement extension returning a candidate position; the enemy system clamps the result.

public abstract class EnemyMovement : IEnemyMovement
Inheritance
EnemyMovement
Implements
Derived
Inherited Members

Constructors

EnemyMovement()

protected EnemyMovement()

Methods

Init(SimWorld, Enemy)

At spawn: fixed per-enemy values (offsets, preferred distance, first target).

public virtual void Init(SimWorld world, Enemy enemy)

Parameters

world SimWorld
enemy Enemy

Step(SimWorld, Enemy, float, float)

The position the enemy wants to be at after this tick, before clamping.

public abstract Vec2 Step(SimWorld world, Enemy enemy, float speed, float dt)

Parameters

world SimWorld
enemy Enemy
speed float
dt float

Returns

Vec2

Towards(SimWorld, Enemy, Vec2, float, float, bool)

protected static Vec2 Towards(SimWorld world, Enemy enemy, Vec2 target, float speed, float dt, bool wander)

Parameters

world SimWorld
enemy Enemy
target Vec2
speed float
dt float
wander bool

Returns

Vec2