예제 #1
0
 public void PrepareUpgreade(BaseTower pickTower)
 {
     buildTower = pickTower;
     if (buildTower.NextTower == null)
     {
         state = TowerState.UpgradComplete;
         return;
     }
     UiManager.Instance.ShowUpgradeUi(this, transform.position);
 }
예제 #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);
        }
예제 #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);
        }