- Source:
Contains functions for different movement patterns to be used by AIs.
Methods
(static) moveRandomly(caller, config) → {boolean}
- Source:
Moves in a random direction, but tries not to move into colliding walls
Parameters:
Name | Type | Description |
---|---|---|
caller |
Phaser.GameObjects.GameObject | The caller game object |
config |
ClubCrawler.Types.MovementConfig | The movement config |
Returns:
- Type
- boolean
(static) moveRandomlyRepeat(caller, config) → {boolean}
- Source:
move randomly repeatedly (not necessary if you are trying to move after a sense update)
Parameters:
Name | Type | Description |
---|---|---|
caller |
Phaser.GameObjects.GameObject | The caller game object |
config |
ClubCrawler.Types.MovementConfig | The movement config |
Returns:
- Type
- boolean
(static) moveTowardsPlayer(caller, config) → {boolean}
- Source:
move towards player
Parameters:
Name | Type | Description |
---|---|---|
caller |
Phaser.GameObjects.GameObject | The caller game object |
config |
ClubCrawler.Types.MovementConfig | The movement config |
Returns:
- Type
- boolean
(static) moveTowardsPlayerRepeat(caller, config) → {boolean}
- Source:
move towards player repeatedly (probably not necessary if you are calling it after a regular Sense update)
Parameters:
Name | Type | Description |
---|---|---|
caller |
Phaser.GameObjects.GameObject | The caller game object |
config |
ClubCrawler.Types.MovementConfig | The movement config |
Returns:
- Type
- boolean
(static) retreatFromPlayer(caller, config) → {boolean}
- Source:
retreat from player movement pattern
Parameters:
Name | Type | Description |
---|---|---|
caller |
Phaser.GameObjects.GameObject | The caller game object |
config |
ClubCrawler.Types.MovementConfig | The movement config |
Returns:
- Type
- boolean
(static) validatePhysicsMove(caller, config) → {boolean}
- Source:
Validates a MovementConfig Object
Parameters:
Name | Type | Description |
---|---|---|
caller |
Phaser.GameObjects.GameObject | The caller game object |
config |
ClubCrawler.Types.MovementConfig | The movement config |
Returns:
- Type
- boolean