summaryrefslogtreecommitdiff
path: root/engine/components/Control.ts
diff options
context:
space:
mode:
authorElizabeth (Lizzy) Hunt <elizabeth.hunt@simponic.xyz>2023-08-26 17:57:05 -0600
committerGitHub <noreply@github.com>2023-08-26 17:57:05 -0600
commit8a4ab8d79b5ce1dabb431168398b5d5111fe326c (patch)
treee60767dc5295edf379cf421e20171dc418e548b7 /engine/components/Control.ts
parentc6e9baa0009f7cce0f6ff156a3957ef04a8cb684 (diff)
parent6ce6946a4401d2ee6fa5cb747fab7d4c658a63c8 (diff)
downloadjumpstorm-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.ts15
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;
}
}