示例#1
0
        void Update()
        {
            if (Input.GetMouseButtonDown(0))
            {
                leftClickDown.Raise();
            }

            if (Input.GetMouseButtonUp(0))
            {
                leftClickUp.Raise();
            }

            if (Input.GetMouseButtonDown(1))
            {
                rightClickDown.Raise();
            }
        }
示例#2
0
 public void OnUpgradeFireRate()
 {
     FireRateUpgrade.Raise();
     //Turret tur = this.selected.Selected.GetComponent<Turret>();
     //if ((tur.RateOfFireTier < this.rateOfFireUpgrades.Length - 1) && (this.resources.currentGold < this.rateOfFireUpgrades[tur.RateOfFireTier + 1].cost))
     //{
     //    Debug.Log("Not enough Gold for Upgrade");
     //    return;
     //}
     //
     //if (tur.RateOfFireTier < this.rateOfFireUpgrades.Length - 1)
     //{
     //    tur.RateOfFireTier += 1;
     //    tur.bulletSpeed = this.rateOfFireUpgrades[tur.RateOfFireTier].rateOfFire;
     //    this.resources.currentGold -= this.rateOfFireUpgrades[tur.RateOfFireTier].cost;
     //    this.gameObject.GetComponent<UI>().SetGold();
     //}
     //else
     //{
     //    Debug.Log("Turret Upgraded to max Fire Rate");
     //}
 }
示例#3
0
        public void OnUpgradeSplash()
        {
            SplashUpgrade.Raise();

            //Turret tur = this.selected.Selected.GetComponent<Turret>();
            //if ((tur.SplashTier < this.splashUpgrades.Length - 1) && (this.resources.currentGold < this.splashUpgrades[tur.SplashTier + 1].cost))
            //{
            //    Debug.Log("Not enough Gold for Upgrade");
            //    return;
            //}
            //
            //if (tur.SplashTier < this.splashUpgrades.Length - 1)
            //{
            //    tur.SplashTier += 1;
            //    tur.splashArea = this.splashUpgrades[tur.SplashTier].splash;
            //    this.resources.currentGold -= this.splashUpgrades[tur.SplashTier].cost;
            //    this.gameObject.GetComponent<UI>().SetGold();
            //}
            //else
            //{
            //    Debug.Log("Turret Upgraded to max Area of Effect");
            //}
        }