// Checks if an upgrade has been purchased at all public static bool isPurchasedGunner(gunnerEffect ge) { int num = 0; gunnerUpgrades.TryGetValue(ge, out num); return(num > 0); }
// Call this to purchase/enable a gunner upgrade public static void purchaseGunnerUpgrade(gunnerEffect toPurchase) { int total = gunnerUpgrades [toPurchase] + 1; gunnerUpgrades [toPurchase] = total; if (toPurchase == gunnerEffect.A_fireRate) { Player_Fire.UpgradeFireRate(total); } else if (toPurchase == gunnerEffect.A_range) { bullet_range.upgradeRange(total); } else if (toPurchase == gunnerEffect.A_ricochet) { Player_Fire.UpgradeRicochet(total); } else if (toPurchase == gunnerEffect.A_multishot) { Player_Fire.UpgradeMultishot(total); } else if (toPurchase == gunnerEffect.A_wideBullets) { Player_Fire.UpgradeBulletWidth(total); } else if (toPurchase == gunnerEffect.missile) { Player_Missile_Fire.UnlockMissiles(total); } else if (toPurchase == gunnerEffect.missile_cooldown) { Player_Missile_Fire.UpgradeCooldown(total); } else if (toPurchase == gunnerEffect.missile_explosions) { Player_Missile_Fire.UpgradeExplosionRadius(total); } else if (toPurchase == gunnerEffect.missile_tripleShot) { Player_Missile_Fire.EnableTripleShot(total); } else if (toPurchase == gunnerEffect.missile_tracking) { Player_Missile_Fire.EnableTracking(total); } else if (toPurchase == gunnerEffect.sword) { sword_script.upgrade_enabled(total); } else if (toPurchase == gunnerEffect.sword_destroyProj) { sword_script.upgrade_projectiles(total); } else if (toPurchase == gunnerEffect.sword_duration) { sword_script.upgrade_dur(total); } else if (toPurchase == gunnerEffect.sword_range) { sword_script.upgrade_range(total); } else if (toPurchase == gunnerEffect.sword_spin) { sword_script.upgrade_spins(total); } else if (toPurchase == gunnerEffect.Y_slowMo) { YButtonManager.UnlockSlowMo(total); } else if (toPurchase == gunnerEffect.Y_starMode) { YButtonManager.UnlockStarMode(total); } }
// ====== INDIVIDUAL UPGRADE IMPLEMENTATIONS HERE ====== // Call this to purchase/enable an upgrade pair public static void purchaseUpgrades(gunnerEffect ge, pilotEffect pe) { purchaseGunnerUpgrade(ge); purchasePilotUpgrade(pe); }