]>
git.r.bdr.sh - rbdr/sumo/blob - lib/components/points_collider.js
ceec7eecf0c4dd205c3107328ae76ab5e0858bd3
1 import { Component
} from '@serpentity/serpentity';
4 * Component that stores a collision target and points accumulation
7 * @extends {external:Serpentity.Component}
8 * @class PointsColliderComponent
9 * @param {object} config a configuration object to extend.
11 export default class PointsColliderComponent
extends Component
{
17 * The target entity that will generate points if it collides
19 * @property {external:Serpentity.Entity} collisionTarget
21 * @memberof PointsColliderComponent
23 this.collisionTarget
= this.collisionTarget
|| null;
26 * The target entity that will generate points if it collides
28 * @property {string} pointsTarget
30 * @memberof PointsColliderComponent
32 this.pointsTarget
= this.pointsTarget
|| 'nobody';