From 0010f2de57cfa97106432ea1849c1bb75d3d99a1 Mon Sep 17 00:00:00 2001 From: Maksymilian Jopek Date: Tue, 31 May 2022 18:11:09 +0200 Subject: All enemies movement --- src/drawables/Bullet.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/drawables/Bullet.ts') diff --git a/src/drawables/Bullet.ts b/src/drawables/Bullet.ts index 68f55e8..a745a06 100644 --- a/src/drawables/Bullet.ts +++ b/src/drawables/Bullet.ts @@ -1,19 +1,21 @@ import { canvas } from "../consts"; -import Drawable from "../Drawable"; +import Drawable, { Rectangle } from "../Drawable"; export default class Bullet extends Drawable { static width = 2; static height = 5; static color = "black"; + width = 2; + height = 5; color = "black"; sprite = "black"; - squares = [this] + squares: Rectangle[] = [new Rectangle(this)] constructor(x: number, y: number, public xvel: number, public yvel: number, public players: boolean) { super(x, y); - this.width = Bullet.width; - this.height = Bullet.height; + // this.width = Bullet.width; + // this.height = Bullet.height; } move(): boolean { -- cgit v1.3.1