Create enemy type
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user