replaced files

This commit is contained in:
Vasyl Kazakov
2026-06-18 16:47:23 +03:00
parent 7cc63dbba9
commit ce3f254bc1
49 changed files with 141 additions and 181 deletions
+30
View File
@@ -0,0 +1,30 @@
import { IMoveInput } from "../Input/MoveInput";
import { Vector3 } from "three";
export class MoveC {
private readonly input: IMoveInput;
private speed: number;
private readonly moveDirection = new Vector3();
constructor(input: IMoveInput, speed = 5) {
this.input = input;
this.speed = speed;
}
get Direction() {
return this.moveDirection;
}
get Weight() {
return this.moveDirection.length() / this.speed;
}
setSpeed(speed: number) {
this.speed = speed;
}
update(_delta: number) {
this.moveDirection.copy(this.input.CurrentDirection).multiplyScalar(this.speed);
}
}