jumpstorm/engine/components/Control.ts

20 lines
567 B
TypeScript
Raw Normal View History

2023-08-25 18:48:17 -04:00
import { Component, ComponentNames, Velocity } from '.';
2023-07-19 23:38:24 -04:00
export class Control extends Component {
public controlVelocityComponent: Velocity;
2023-08-23 21:44:59 -04:00
public controllableBy: string;
public isControllable?: boolean; // updated by the input system
2023-08-12 15:49:16 -04:00
constructor(
2023-08-23 21:44:59 -04:00
controllableBy: string,
controlVelocityComponent: Velocity = new Velocity(),
isControllable?: boolean
) {
2023-07-19 23:38:24 -04:00
super(ComponentNames.Control);
2023-08-12 15:49:16 -04:00
2023-08-23 21:44:59 -04:00
this.controllableBy = controllableBy;
this.isControllable = isControllable;
this.controlVelocityComponent = controlVelocityComponent;
2023-07-19 23:38:24 -04:00
}
}