summaryrefslogtreecommitdiff
path: root/engine/components/Control.ts
blob: d3987d702129b3e28147924051d7228fa44af18b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { Component, ComponentNames, Velocity } from '.';

export class Control extends Component {
  public controlVelocityComponent: Velocity;
  public controllableBy: string;
  public isControllable: boolean; // computed each update in the input system

  constructor(
    controllableBy: string,
    controlVelocityComponent: Velocity = new Velocity()
  ) {
    super(ComponentNames.Control);

    this.controllableBy = controllableBy;
    this.controlVelocityComponent = controlVelocityComponent;
    this.isControllable = false;
  }
}