diff options
author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-08-29 12:05:02 -0600 |
---|---|---|
committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-08-29 12:05:02 -0600 |
commit | fd1bb1cca9521348ae2849ef30be09264503681e (patch) | |
tree | 6859c24c53fdd2a83ed0a92ee10272aa70b6c55d /engine/components/Control.ts | |
parent | 8a4ab8d79b5ce1dabb431168398b5d5111fe326c (diff) | |
download | jumpstorm-fd1bb1cca9521348ae2849ef30be09264503681e.tar.gz jumpstorm-fd1bb1cca9521348ae2849ef30be09264503681e.zip |
don't update controllable entities on the client
Diffstat (limited to 'engine/components/Control.ts')
-rw-r--r-- | engine/components/Control.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/engine/components/Control.ts b/engine/components/Control.ts index d3987d7..b6a3dc3 100644 --- a/engine/components/Control.ts +++ b/engine/components/Control.ts @@ -3,16 +3,17 @@ 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 + public isControllable?: boolean; // updated by the input system constructor( controllableBy: string, - controlVelocityComponent: Velocity = new Velocity() + controlVelocityComponent: Velocity = new Velocity(), + isControllable?: boolean ) { super(ComponentNames.Control); this.controllableBy = controllableBy; + this.isControllable = isControllable; this.controlVelocityComponent = controlVelocityComponent; - this.isControllable = false; } } |