2D Platform Controller  v1.7.0
Autogenerated code documentation for the 2D Platform Controller.
 All Classes Functions Variables Properties
EnemyAIController Class Reference

An enemy AI which tries to follow the player. Its built using the hack until it works philosophy of AI design, so the code might be a little hard to follow. Currently it doesn't cater for sense distance nor do path finding. Specifically it doesn't plan a route to a player it just tries to get on to higher platforms if the player is higher and lower platforms if the player is lower. More...

Inherits RaycastCharacterInput, and IEnemy.

Public Member Functions

void Kill ()
 
void KillFromAbove (HitBox other, Collider me)
 
void KillFromBelow (float force)
 
- Public Member Functions inherited from RaycastCharacterInput
virtual void CancelJump ()
 Stop jump from happening, useful for platforms that don't let you jump (or special jump behaviour). More...
 

Public Attributes

BoxCollider[] geometry
 
RaycastCharacterController me
 
float xDelta = 0.5f
 
float yDelta = 0.25f
 
float jumpHeight
 
float jumpDistance
 
float decideTime = 0.5f
 
RaycastCharacterController targetController
 

Additional Inherited Members

- Properties inherited from RaycastCharacterInput
virtual float x [get, set]
 The x movement. Use 1.0f or -1.0f to run. Smaller values to walk. More...
 
virtual float y [get, set]
 The y movement. 1.0f = up, -1.0f = down. More...
 
virtual bool jumpButtonHeld [get, set]
 Is the jump button being held down. More...
 
virtual bool jumpButtonDown [get, set]
 Was the jump button pressed this frame. More...
 

Detailed Description

An enemy AI which tries to follow the player. Its built using the hack until it works philosophy of AI design, so the code might be a little hard to follow. Currently it doesn't cater for sense distance nor do path finding. Specifically it doesn't plan a route to a player it just tries to get on to higher platforms if the player is higher and lower platforms if the player is lower.

It takes a map of the level geometry (expected to be box colliders) and will only consider geometry added to its list. YOu can use this to somewhat restrict the places it will move to (by only including a subset of level geometry).


The documentation for this class was generated from the following file: