Better Zhen animation

This commit is contained in:
BOTAlex 2024-03-31 01:02:29 +01:00
parent 03cfd5a617
commit 8ed6d26c40
2 changed files with 88 additions and 41 deletions

View file

@ -0,0 +1,21 @@
export class Vector2 {
x: number;
y: number;
constructor(x: number, y: number) {
this.x = x;
this.y = y;
}
Add(vec2: Vector2){
return new Vector2(this.x + vec2.x, this.y + vec2.y);
}
Sub(vec2: Vector2){
return new Vector2(this.x - vec2.x, this.y - vec2.y);
}
Scale(mult: number){
return new Vector2(this.x * mult, this.y * mult);;
}
}