diff options
author | Elizabeth (Lizzy) Hunt <elizabeth.hunt@simponic.xyz> | 2023-08-26 17:57:05 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-26 17:57:05 -0600 |
commit | 8a4ab8d79b5ce1dabb431168398b5d5111fe326c (patch) | |
tree | e60767dc5295edf379cf421e20171dc418e548b7 /engine/components/Control.ts | |
parent | c6e9baa0009f7cce0f6ff156a3957ef04a8cb684 (diff) | |
parent | 6ce6946a4401d2ee6fa5cb747fab7d4c658a63c8 (diff) | |
download | jumpstorm-8a4ab8d79b5ce1dabb431168398b5d5111fe326c.tar.gz jumpstorm-8a4ab8d79b5ce1dabb431168398b5d5111fe326c.zip |
Merge pull request #1 from Simponic/network
Network
Diffstat (limited to 'engine/components/Control.ts')
-rw-r--r-- | engine/components/Control.ts | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/engine/components/Control.ts b/engine/components/Control.ts index 1e782ee..d3987d7 100644 --- a/engine/components/Control.ts +++ b/engine/components/Control.ts @@ -1,11 +1,18 @@ -import { Component, ComponentNames, Velocity } from "."; +import { Component, ComponentNames, Velocity } from '.'; export class Control extends Component { - public controlVelocity: Velocity; + public controlVelocityComponent: Velocity; + public controllableBy: string; + public isControllable: boolean; // computed each update in the input system - constructor(controlVelocity: Velocity = new Velocity()) { + constructor( + controllableBy: string, + controlVelocityComponent: Velocity = new Velocity() + ) { super(ComponentNames.Control); - this.controlVelocity = controlVelocity; + this.controllableBy = controllableBy; + this.controlVelocityComponent = controlVelocityComponent; + this.isControllable = false; } } |