void CheckTurretTypeAndMakeSpecial() { //bullet if (turret.GetComponent <BulletTurret>()) { SpecialActivator.MakeBulletSpecial(turret.GetComponent <BulletTurret>()); } //missile else if (turret.GetComponent <MissileTurret>()) { SpecialActivator.MakeMissileSpecial(turret.GetComponent <MissileTurret>()); } //railgun else if (turret.GetComponent <RailgunTurret>()) { SpecialActivator.MakeRailgunSpecial(turret.GetComponent <RailgunTurret>()); } //laser else if (turret.GetComponent <LaserTurret>()) { SpecialActivator.MakeLaserSpecial(turret.GetComponent <LaserTurret>()); } //tesla else if (turret.GetComponent <TeslaTurret>()) { SpecialActivator.MakeTeslaSpecial(turret.GetComponent <TeslaTurret>()); } //fire else if (turret.GetComponent <FireTurret>()) { SpecialActivator.MakeFireSpecial(turret.GetComponent <FireTurret>()); } //tank else if (turret.GetComponent <TankTurret>()) { SpecialActivator.MakeTankSpecial(turret.GetComponent <TankTurret>()); } //farm else if (turret.GetComponent <FarmTower>()) { SpecialActivator.MakeFarmSpecial(turret.GetComponent <FarmTower>()); } //wind else if (turret.GetComponent <WindTurret>()) { SpecialActivator.MakeWindSpecial(turret.GetComponent <WindTurret>()); } }
void Awake() { instance = this; bulletBtn.SetActive(false); missileBtn.SetActive(false); railgunBtn.SetActive(false); laserBtn.SetActive(false); teslaBtn.SetActive(false); fireBtn.SetActive(false); tankBtn.SetActive(false); farmBtn.SetActive(false); windBtn.SetActive(false); }