Create enemy type

This commit is contained in:
Peter Stockings
2026-01-05 13:00:16 +11:00
parent 161da3a64a
commit e223bf4b40
4 changed files with 10 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
import Phaser from "phaser";
import { type EntityId } from "../core/types";
import { type EntityId, type ActorType } from "../core/types";
import { TILE_SIZE } from "../core/constants";
import { GAME_CONFIG } from "../core/config/GameConfig";
@@ -109,7 +109,7 @@ export class FxRenderer {
});
}
spawnCorpse(x: number, y: number, type: "player" | "rat" | "bat") {
spawnCorpse(x: number, y: number, type: ActorType) {
const textureKey = type === "player" ? "warrior" : type;
const corpse = this.scene.add.sprite(