From e8c094016ac3f6fd232019c033c7965b92e3213a Mon Sep 17 00:00:00 2001 From: koneko <67551503+koneko@users.noreply.github.com> Date: Tue, 7 Jan 2025 22:02:42 +0100 Subject: [PATCH] small creep update --- src/classes/game/Creep.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/classes/game/Creep.ts b/src/classes/game/Creep.ts index abda72b..bbf4269 100644 --- a/src/classes/game/Creep.ts +++ b/src/classes/game/Creep.ts @@ -1,3 +1,4 @@ +import GameAssets from '../Assets'; import Assets from '../Assets'; import { Globals } from '../Bastion'; import { CreepStatsDefinition, CreepType, PathDefinition } from '../Definitions'; @@ -27,8 +28,11 @@ export default class Creep extends GameObject { constructor(creepType: CreepType, path: PathDefinition) { super(); this.creepType = creepType; - this.stats = Assets.CreepStats[this.creepType]; - this.sprite = new PIXI.Sprite(Assets.BasicCreepTexture); + this.stats = structuredClone(Assets.CreepStats[this.creepType]); + this.sprite = new PIXI.Sprite({ + texture: GameAssets.BasicCreepTexture, + }); + this.container.label = 'creep-' + creepType.toString(); // because wave manager spawns all instantly and i dont want // it to look like a shit game (they all spawn in top left corner) // i want to hide minion - mario