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>(); }
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)); } }
public void ShowUpgradeUi(UpGradeTower baseTower, Vector3 pos) { uiEvent.ShowUpgradeBtn(baseTower); GameManager.ChangeGameState(GameState.OpenUi); OpenPanel(UiState.OpenUpGradePanel, UiTool.GetTowerUiPos(transform, UiCamera, pos)); }
public void SetPos(Vector3 pos) { charUiRect.anchoredPosition = UiTool.GetTowerUiPos(uiManagerTrans, UiCamera, pos); }