]> git.r.bdr.sh - rbdr/sumo/blame_incremental - lib/components/points_collider.js
Pixelate the text
[rbdr/sumo] / lib / components / points_collider.js
... / ...
CommitLineData
1import { Component } from '@serpentity/serpentity';
2
3/**
4 * Component that stores a collision target and points accumulation
5 * target
6 *
7 * @extends {external:Serpentity.Component}
8 * @class PointsColliderComponent
9 * @param {object} config a configuration object to extend.
10 */
11export default class PointsColliderComponent extends Component {
12 constructor(config) {
13
14 super(config);
15
16 /**
17 * The target entity that will generate points if it collides
18 *
19 * @property {external:Serpentity.Entity} collisionTarget
20 * @instance
21 * @memberof PointsColliderComponent
22 */
23 this.collisionTarget = this.collisionTarget || null;
24
25 /**
26 * The target entity that will generate points if it collides
27 *
28 * @property {string} pointsTarget
29 * @instance
30 * @memberof PointsColliderComponent
31 */
32 this.pointsTarget = this.pointsTarget || 'nobody';
33 }
34};
35