コード例 #1
0
ファイル: Node.cs プロジェクト: MarcusD96/Tower_Defence_Me
    void CheckTurretTypeToSell()
    {
        //bullet
        if (turret.GetComponent <BulletTurret>())
        {
            BulletSpecial.RemoveTurret(turret.GetComponent <BulletTurret>());
        }

        //missile
        else if (turret.GetComponent <MissileTurret>())
        {
            MissileSpecial.RemoveTurret(turret.GetComponent <MissileTurret>());
        }

        //railgun
        else if (turret.GetComponent <RailgunTurret>())
        {
            RailgunSpecial.RemoveTurret(turret.GetComponent <RailgunTurret>());
        }

        //laser
        else if (turret.GetComponent <LaserTurret>())
        {
            LaserSpecial.RemoveTurret(turret.GetComponent <LaserTurret>());
        }

        //tesla
        else if (turret.GetComponent <TeslaTurret>())
        {
            TeslaSpecial.RemoveTurret(turret.GetComponent <TeslaTurret>());
        }

        //fire
        else if (turret.GetComponent <FireTurret>())
        {
            FireSpecial.RemoveTurret(turret.GetComponent <FireTurret>());
        }

        //tank
        else if (turret.GetComponent <TankTurret>())
        {
            TankSpecial.RemoveTurret(turret.GetComponent <TankTurret>());
        }

        //farm
        else if (turret.GetComponent <FarmTower>())
        {
            FarmSpecial.RemoveTower(turret.GetComponent <FarmTower>());
        }

        else if (turret.GetComponent <WindTurret>())
        {
            WindSpecial.RemoveTurret(turret.GetComponent <WindTurret>());
        }
    }
コード例 #2
0
 void Awake()
 {
     instance = this;
     turrets  = new List <WindTurret>();
     num.gameObject.SetActive(false);
 }
コード例 #3
0
 public static void MakeWindSpecial(WindTurret wind)
 {
     instance.windBtn.SetActive(true);
     WindSpecial.AddNewWindTurret(wind);
 }