Beispiel #1
0
 public void PrepareUpgreade(BaseTower pickTower)
 {
     buildTower = pickTower;
     if (buildTower.NextTower == null)
     {
         state = TowerState.UpgradComplete;
         return;
     }
     UiManager.Instance.ShowUpgradeUi(this, transform.position);
 }
Beispiel #2
0
        public override GameObject PickUp(Transform controllPoint)
        {
            state = TowerState.NoUpgrade;
            buildTower.transform.SetParent(controllPoint);
            buildTower.transform.localPosition = Vector3.zero;
            GameManager.ChangeGameState(GameState.PickThing);
            BaseTower renturnTower = buildTower;

            buildTower = default;
            return(renturnTower.gameObject);
        }
Beispiel #3
0
        public override GameObject PutDown(Vector3 putPos)
        {
            Debug.Log(name + " " + CurTower.curLevel);
            GameObject towerObj = PlayerInput.Pickable.PutDown(putPos);
            BaseTower  tower    = towerObj.GetComponent <BaseTower>();

//         sp.sortingOrder = CurPoint.Y;
            PrepareUpgreade(tower);
            transform.SetParent(transform);
            transform.localPosition = Vector3.zero;
            return(towerObj);
        }