- Source:
Functions for ais to evaluate the world around them.
Objects using senses should define a sense function.
The "repeat" functions call .sense on the object using the sense function; that object should define how it responds to senses, such as by using a movement function.
Interfaces
Methods
(static) sensePlayer(caller, config) → {boolean}
- Source:
Senses the player, then calles sense on caller on it
Parameters:
Name | Type | Description |
---|---|---|
caller |
Phaser.GameObjects.GameObject | The caller game object |
config |
ClubCrawler.Types.SenseConfig | The sense config |
Returns:
- Type
- boolean
(static) sensePlayerRepeat(caller, config) → {boolean}
- Source:
Senses the player, and repeats sensing at set intervals
Parameters:
Name | Type | Description |
---|---|---|
caller |
Phaser.GameObjects.GameObject | The caller game object |
config |
ClubCrawler.Types.SenseConfig | The sense config |
Returns:
- Type
- boolean
(static) validateSense(caller, config) → {boolean}
- Source:
Validates a SenseConfig Object
Parameters:
Name | Type | Description |
---|---|---|
caller |
Phaser.GameObjects.GameObject | The caller game object |
config |
ClubCrawler.Types.SenseConfig | The sense config |
Returns:
- Type
- boolean