EnemyAI houses basic AI functionality, including patrolling left and right, turning on contact with walls or ledges, moving towards another actor, jumping at intervals or on contact with ledges, and attacking at intervals.
Public void FacePlayer()
If GameManager has a Player slotted, this turns the Enemy to face it.
public void OnNewStateAdded(RexState _state)
Used internally when new RexState components are added to the GameObject the EnemyAI is on. This allows EnemyAI to know about those states and interact with them if necessary.
public Slots slots
Various base-level things are slotted here, such as the attached RexActor and RexPhysics.
public StartingMovement startingMovement
Governs the direction this actor initially moves and if it will face the player when created.
public Turn turn
Options for if this actor will turn when it hits walls, the floor, the ceiling, or ledges.
public Jump jump
Options for this actor to jump, including whether it will jump automatically at intervals or whether it will jump upon encountering a ledge.
public MoveTowardsTransform moveTowards
Options allowing this actor to automatically move towards another Transform.
public Attacks attacks
Options for the Attacks this actor will use, including if it will perform the attacks automatically at intervals.