]>
Commit | Line | Data |
---|---|---|
1 | import { Component } from '@serpentity/serpentity'; | |
2 | ||
3 | /** | |
4 | * Component that stores a dash skill | |
5 | * | |
6 | * @extends {external:Serpentity.Component} | |
7 | * @class DashComponent | |
8 | * @param {object} config a configuration object to extend. | |
9 | */ | |
10 | export default class DashComponent extends Component { | |
11 | constructor(config) { | |
12 | ||
13 | super(config); | |
14 | ||
15 | /** | |
16 | * The properthy that holds the dash state | |
17 | * | |
18 | * @property {boolean} dashing | |
19 | * @instance | |
20 | * @memberof DashComponent | |
21 | */ | |
22 | this.dashing = this.dashing || false; | |
23 | ||
24 | /** | |
25 | * Whether the dash is locked from occuring | |
26 | * | |
27 | * @property {boolean} locked | |
28 | * @instance | |
29 | * @memberof DashComponent | |
30 | */ | |
31 | this.locked = this.locked || false; | |
32 | ||
33 | /** | |
34 | * Cooldown before lock is removed | |
35 | * | |
36 | * @property {number} cooldown | |
37 | * @instance | |
38 | * @memberof DashComponent | |
39 | */ | |
40 | this.cooldown = this.cooldown || 4000; | |
41 | ||
42 | /** | |
43 | * Current cooldown | |
44 | * | |
45 | * @property {number} currentCooldown | |
46 | * @instance | |
47 | * @memberof DashComponent | |
48 | */ | |
49 | this.currentCooldown = 0; | |
50 | } | |
51 | }; |