- Source:
Types, configuration objects in ClubCrawler
Type Definitions
DebugConfig
- Source:
Properties:
Name | Type | Attributes | Default | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
on |
boolean |
<optional> |
false
|
Whether debug is active and should be displayed |
||||||||||||
duration |
number |
<optional> |
3000
|
How long a message remains on the scene |
||||||||||||
max |
number |
<optional> |
10
|
Max number of messages to show on the overlay |
||||||||||||
weapon |
Object | Debug settings for weapon Properties
|
||||||||||||||
items |
Object | Debug settings for items Properties
|
||||||||||||||
enemies |
Object | Debug settings for enemies Properties
|
||||||||||||||
destructibles |
Object | Debug settings for destructibles Properties
|
||||||||||||||
logic |
Object | Debug settings for game logic Properties
|
||||||||||||||
map |
Object | Debug settings for map parsings Properties
|
||||||||||||||
player |
Object | Debug settings for player Properties
|
||||||||||||||
emitter |
Phaser.Events.EventEmitter | An emitter for debug messaging events. |
Default configuration for a destructible object
Type:
- Object
DestructibleConfig
- Source:
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
name |
string |
<optional> |
"Cylinder"
|
|
health |
number |
<optional> |
15
|
|
speed |
number |
<optional> |
100
|
|
maxSpeed |
number |
<optional> |
500
|
|
updateSpeed |
number |
<optional> |
500
|
|
velocityIncrement |
number |
<optional> |
450
|
|
mass |
number |
<optional> |
2
|
|
drag |
number |
<optional> |
800
|
|
maxCoins |
number |
<optional> |
2
|
|
minCoins |
number |
<optional> |
1
|
|
damage |
number |
<optional> |
0
|
|
spriteKey |
string |
<optional> |
"cylinder"
|
Default configuration for a destructible object
Type:
- Object
EnemyConfig
- Source:
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
name |
string |
<optional> |
"Ogre"
|
|
health |
number |
<optional> |
300
|
|
speed |
number |
<optional> |
100
|
|
maxSpeed |
number |
<optional> |
500
|
|
updateSpeed |
number |
<optional> |
500
|
How often the AI updates and changes patterns based on sense input |
velocityIncrement |
number |
<optional> |
400
|
Essentially, acceleration |
mass |
number |
<optional> |
5
|
|
drag |
number |
<optional> |
50
|
|
maxCoins |
number |
<optional> |
10
|
|
minCoins |
number |
<optional> |
5
|
|
senseRange |
number |
<optional> |
800
|
How far away the enemy can sense the player |
damage |
number |
<optional> |
5
|
|
sfxVolume |
number |
<optional> |
0.1
|
Not currently implemented / working |
spriteKey |
number |
<optional> |
"ogre"
|
|
spriteAttackFrame |
string |
<optional> |
"attack.png"
|
|
spriteStillFrame |
string |
<optional> |
"still.png"
|
|
audioSpriteKey |
string |
<optional> |
"ogre-sound"
|
Overall audio sprite key |
weapon |
number |
<optional> |
null
|
Not yet implemented |
Default configuration for an enemy. Default is Ogre stats.
Type:
- Object
GameItemConfig
- Source:
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
scene |
Phaser.Scene | The physics scene |
|
|
number | height - the TiledItem value |
|
|
number | id - the TiledItem value |
|
|
string | name - the TiledItem value |
|
|
number | rotation - the TiledItem value |
|
|
string | type - the TiledItem value |
|
|
boolean | visible - the TiledItem value |
|
|
number | width - the TiledItem value |
|
|
number | x - the TiledItem value |
|
|
number | y - the TiledItem value |
|
properties |
Object |
<optional> |
The custom properties set in tile |
This configuration is passed to anything created based on Tiled Object Layer Data
It may have other properties. EVERY custom property in Tiled is applied to the config object ClubCrawler.Utility.Parse
Type:
- Object
InventoryConfig
- Source:
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
inventorySize |
number |
<optional> |
21
|
The max number of items in inventory |
player |
ClubCrawler.Objects.Player |
<optional> |
null
|
The player (added at run time!) |
reticle |
ClubCrawler.Objects.Reticle |
<optional> |
null
|
The reticle (added at run time!) |
scene |
Phaser.Scene |
<optional> |
null
|
The scene (added at run time!) |
MovementConfig
- Source:
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
scene |
Phaser.Scene | The physics scene |
||
repeatTime |
number |
<optional> |
How often to update for repeated functions |
|
velocityIncrement |
number |
<optional> |
How fast to move the object |
|
moveRatio |
number |
<optional> |
1
|
How much do multiply velocity by, relevant if velocityIncrement is determined from the object being moved instead |
maxFailedAttempts |
number |
<optional> |
10
|
How many times a repeating movement will be executed without success before it stops trying |
failureDrift |
number |
<optional> |
1
|
If a repeating movement, how much offset from the last x/y is considered a failed attempt after the move |
Type:
- Object
SensationConfig
- Source:
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
target |
GameObject | string |
<optional> |
The target being sensed, if there is one |
distance |
number |
<optional> |
The distance away the target is, if there is one |
SenseConfig
- Source:
Properties:
Name | Type | Description |
---|---|---|
scene |
Phaser.Scene | |
player |
ClubCrawler.Objects.Player | |
repeatTime |
int | Will be set to the updateInterval of the calling object if there is one, if not provided in configuration object |
For configuring a Sense function, especially repeating sense functions.
Type:
- Object
WeaponConfig
- Source:
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
name |
number |
<optional> |
"popper"
|
Name of the weapon |
duration |
number |
<optional> |
1000
|
How long before the bullet disappers |
projectileVelocity |
number |
<optional> |
1000
|
Velocity of bullet |
spin |
number |
<optional> |
2000
|
Angular velocity of bullet |
mass |
number |
<optional> |
0.1
|
Mass of the bullet (affects knockback) |
damage |
number |
<optional> |
20
|
Damage dealt |
fireRate |
number |
<optional> |
300
|
Delay between bullet firings |
spriteKey |
number |
<optional> |
"bullet"
|
|
audioSpriteKey |
number |
<optional> |
"bullet-sound"
|
|
audioFireKey |
number |
<optional> |
"shot1"
|
|
audioBounceKey |
number |
<optional> |
"bounce1"
|
|
audioHitKey |
number |
<optional> |
"bounce1"
|
|
bounce |
number |
<optional> |
0.3
|
|
hitEnemies |
number |
<optional> |
true
|
|
overlapEnemies |
number |
<optional> |
false
|
|
hitWalls |
number |
<optional> |
true
|
|
hitPlayer |
number |
<optional> |
false
|
Whether bullet hits player (causing physics transfer and damage) |
overlapPlayer |
number |
<optional> |
false
|
Whether bullet damages player by overlap. Only hitPlayer or overlapPlayer should be set to true, not both, but both may be false. |
hitDestructibles |
number |
<optional> |
true
|
|
overlapDestructibles |
number |
<optional> |
false
|
|
destroyOnWallTouch |
number |
<optional> |
false
|
Whether the bullet is destroyed when it contacts a wall |
inventorySprite |
string |
<optional> |
"popper-inventory"
|
The inventory sprite to display |
itemType |
string |
<optional> |
"weapon"
|
The item type for inventory purposes; weapons can't have multiples |
scene |
Phaser.Scene | The scene where the weapon will operate (added during run time!) |
||
wielder |
ClubCrawler.Objects.Player | The player wielding the weapon (added during run time!) |
||
target |
ClubCrawler.Objects.Reticle | The target (reticle) for the weapon (added during run time!) |
Default configuration for a weapon and bullet. Default is the 'popper'
Type:
- Object