This commit is contained in:
2026-05-15 20:11:19 +02:00
parent 1722842e0a
commit c9f0b5d704
6 changed files with 195 additions and 40 deletions

View File

@@ -0,0 +1,15 @@
import Phaser from "phaser";
export class ObstacleSpikeNormal extends Phaser.GameObjects.Rectangle {
static readonly WIDTH = 40;
static readonly HEIGHT = 20;
static readonly COLOR = 0xff3333;
declare body: Phaser.Physics.Arcade.StaticBody;
constructor(scene: Phaser.Scene, x: number, y: number) {
super(scene, x, y, ObstacleSpikeNormal.WIDTH, ObstacleSpikeNormal.HEIGHT, ObstacleSpikeNormal.COLOR);
scene.add.existing(this);
scene.physics.add.existing(this, true);
}
}