From b8e66195fbb4bcb1af10b85611a1d0bdf14e949a Mon Sep 17 00:00:00 2001 From: Martin Date: Mon, 12 Dec 2022 14:40:38 +0100 Subject: [PATCH] Diagonal launcher upgrade --- assets/Scripts/Game/Upgrades/UpgradeType.ts | 5 ++++- assets/Scripts/Game/Upgrades/Upgrader.ts | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/assets/Scripts/Game/Upgrades/UpgradeType.ts b/assets/Scripts/Game/Upgrades/UpgradeType.ts index a821744..afd09cc 100644 --- a/assets/Scripts/Game/Upgrades/UpgradeType.ts +++ b/assets/Scripts/Game/Upgrades/UpgradeType.ts @@ -2,6 +2,7 @@ export enum UpgradeType { WeaponLength, WeaponDamage, HorizontalProjectile, + DiagonalProjectile, HaloProjectlie, Regeneration } @@ -10,5 +11,7 @@ export enum MetaUpgradeType { MaxHp, OverallDamage, ProjectilePiercing, - MovementSpeed + MovementSpeed, + XPGatherer, + GoldGatherer } diff --git a/assets/Scripts/Game/Upgrades/Upgrader.ts b/assets/Scripts/Game/Upgrades/Upgrader.ts index e9bba66..3e46f2e 100644 --- a/assets/Scripts/Game/Upgrades/Upgrader.ts +++ b/assets/Scripts/Game/Upgrades/Upgrader.ts @@ -13,6 +13,7 @@ export class Upgrader { private player: Player, private horizontalProjectileLauncher: WaveProjectileLauncher, private haloProjectileLauncher: HaloProjectileLauncher, + private diagonalProjectileLauncher: WaveProjectileLauncher, settings: UpgradeSettings ) { this.setTypeMaps(UpgradeType.WeaponLength, this.upgradeWeaponLength.bind(this), settings.maxWeaponLengthUpgrades); @@ -22,6 +23,7 @@ export class Upgrader { this.upgradeHorizontalProjectileLauncher.bind(this), settings.maxHorizontalProjectileUpgrades ); + this.setTypeMaps(UpgradeType.DiagonalProjectile, this.upgradeDiagonalProjectileLauncher.bind(this), settings.maxDiagonalProjectileUpgrades); this.setTypeMaps(UpgradeType.HaloProjectlie, this.upgradeHaloProjectileLauncher.bind(this), settings.maxHaloProjectileUpgrades); this.setTypeMaps(UpgradeType.Regeneration, this.upgradeRegeneration.bind(this), settings.maxRegenerationUpgrades); } @@ -64,6 +66,10 @@ export class Upgrader { this.horizontalProjectileLauncher.upgrade(); } + private upgradeDiagonalProjectileLauncher(): void { + this.diagonalProjectileLauncher.upgrade(); + } + private upgradeHaloProjectileLauncher(): void { this.haloProjectileLauncher.upgrade(); }