Esempio n. 1
0
        public void CreateTimer(ref TimeCountDown timeCountDown, Vector3 pos)
        {
            GameObject newTimer = Instantiate(timer, timerList);

            newTimer.SetActive(false);
            (newTimer.transform as RectTransform).anchoredPosition = UiTool.GetTowerUiPos(transform, UiCamera, pos);
            newTimer.name = "TimerCount" + timeCountList.Count;
            timeCountList.Add(newTimer);
            timeCountDown = newTimer.GetComponent <TimeCountDown>();
        }
Esempio n. 2
0
        public void ShowTowerUi()
        {
            Vector3Int pointPos = VTool.ToPointPos(ControllPoint.Position);

            if (!GameManager.Instance.HadThisPoint(pointPos))
            {
                return;
            }

            FontPoint = GameManager.GetPointByPos(pointPos);
            if (FontPoint.state == PointState.noThing)
            {
                OpenPanel(UiState.OpenChoosePanel, UiTool.GetTowerUiPos(transform, UiCamera, ControllPoint.Position));
            }
        }
Esempio n. 3
0
 public void ShowUpgradeUi(UpGradeTower baseTower, Vector3 pos)
 {
     uiEvent.ShowUpgradeBtn(baseTower);
     GameManager.ChangeGameState(GameState.OpenUi);
     OpenPanel(UiState.OpenUpGradePanel, UiTool.GetTowerUiPos(transform, UiCamera, pos));
 }
Esempio n. 4
0
 public void SetPos(Vector3 pos)
 {
     charUiRect.anchoredPosition = UiTool.GetTowerUiPos(uiManagerTrans, UiCamera, pos);
 }