mirror of
https://github.com/MartinKral/Slash-The-Hordes
synced 2025-09-24 04:39:05 +00:00
Chest and magnet spawning
This commit is contained in:
@@ -29,6 +29,8 @@ export class Enemy extends Component {
|
||||
private xpReward: number;
|
||||
private goldReward: number;
|
||||
private healthPotionRewardChance: number;
|
||||
private magnetRewardChance: number;
|
||||
private chestRewardChance: number;
|
||||
|
||||
private endOfLifetimeTriggered = false;
|
||||
|
||||
@@ -44,6 +46,8 @@ export class Enemy extends Component {
|
||||
this.xpReward = settings.xpReward;
|
||||
this.goldReward = settings.goldReward;
|
||||
this.healthPotionRewardChance = settings.healthPotionRewardChance;
|
||||
this.magnetRewardChance = settings.magnetRewardChance;
|
||||
this.chestRewardChance = settings.chestRewardChance;
|
||||
|
||||
this.node.setWorldPosition(position);
|
||||
this.node.active = true;
|
||||
@@ -88,6 +92,14 @@ export class Enemy extends Component {
|
||||
return this.healthPotionRewardChance;
|
||||
}
|
||||
|
||||
public get MagnetRewardChance(): number {
|
||||
return this.magnetRewardChance;
|
||||
}
|
||||
|
||||
public get ChestRewardChance(): number {
|
||||
return this.chestRewardChance;
|
||||
}
|
||||
|
||||
public get LifetimeEndedEvent(): ISignal<Enemy> {
|
||||
return this.lifetimeEndedEvent;
|
||||
}
|
||||
|
Reference in New Issue
Block a user