mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-13 13:04:03 +00:00
26 lines
585 B
JavaScript
26 lines
585 B
JavaScript
|
import { Component } from "../component";
|
||
|
import { ShapeDefinition } from "../shape_definition";
|
||
|
|
||
|
export class HubComponent extends Component {
|
||
|
static getId() {
|
||
|
return "Hub";
|
||
|
}
|
||
|
|
||
|
constructor() {
|
||
|
super();
|
||
|
|
||
|
/**
|
||
|
* Shape definitions in queue to be analyzed and counted towards the goal
|
||
|
* @type {Array<ShapeDefinition>}
|
||
|
*/
|
||
|
this.definitionsToAnalyze = [];
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @param {ShapeDefinition} definition
|
||
|
*/
|
||
|
queueShapeDefinition(definition) {
|
||
|
this.definitionsToAnalyze.push(definition);
|
||
|
}
|
||
|
}
|