diff options
| author | Maksymilian Jopek <maks@jopek.eu> | 2022-05-31 18:11:09 +0200 |
|---|---|---|
| committer | Maksymilian Jopek <maks@jopek.eu> | 2022-05-31 18:11:09 +0200 |
| commit | 0010f2de57cfa97106432ea1849c1bb75d3d99a1 (patch) | |
| tree | 41e89ff13aacfc4dc1324a365302a0867e316dc9 /src/drawables/Bullet.ts | |
| parent | 344737031e5bbad5f24469aabf45be6535c893f3 (diff) | |
| download | 1942-0010f2de57cfa97106432ea1849c1bb75d3d99a1.tar.gz 1942-0010f2de57cfa97106432ea1849c1bb75d3d99a1.tar.zst 1942-0010f2de57cfa97106432ea1849c1bb75d3d99a1.zip | |
All enemies movement
Diffstat (limited to 'src/drawables/Bullet.ts')
| -rw-r--r-- | src/drawables/Bullet.ts | 10 |
1 files changed, 6 insertions, 4 deletions
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 { |
