mirror of
https://github.com/MartinKral/Slash-The-Hordes
synced 2025-10-09 08:36:14 +00:00
Added regeneration
This commit is contained in:
@@ -12,7 +12,8 @@ export class Upgrader {
|
||||
this.player = player;
|
||||
|
||||
this.setTypeMaps(UpgradeType.WeaponLength, this.upgradeWeaponLength.bind(this), settings.maxWeaponLengthUpgrades);
|
||||
this.setTypeMaps(UpgradeType.WeaponDamage, this.upgradeWeaponDamage, settings.maxWeaponDamageUpgrades);
|
||||
this.setTypeMaps(UpgradeType.WeaponDamage, this.upgradeWeaponDamage.bind(this), settings.maxWeaponDamageUpgrades);
|
||||
this.setTypeMaps(UpgradeType.Regeneration, this.upgradeRegeneration.bind(this), settings.maxRegenerationUpgrades);
|
||||
}
|
||||
|
||||
public upgradeSkill(type: UpgradeType): void {
|
||||
@@ -49,6 +50,10 @@ export class Upgrader {
|
||||
this.player.Weapon.upgradeWeaponDamage();
|
||||
}
|
||||
|
||||
private upgradeRegeneration(): void {
|
||||
this.player.Regeneration.upgrade();
|
||||
}
|
||||
|
||||
private isMaxLevel(type: UpgradeType): boolean {
|
||||
return this.typeToMaxLevel.get(type) <= this.typeToLevel.get(type);
|
||||
}
|
||||
|
Reference in New Issue
Block a user