コード例 #1
0
        public override IEnumerator OnEndTurn()
        {
            yield return(GameManager.Instance.UiManager.HideCancelButton());

            yield return(GameManager.Instance.UiManager.HideTowerActionBar());

            yield return(StateUtility.OnEndTurn());
        }
コード例 #2
0
        public override IEnumerator OnTowerClick(IGridObject tower, PointerEventData eventData)
        {
            yield return(GameManager.Instance.UiManager.HideCancelButton());

            yield return(GameManager.Instance.UiManager.HideTowerActionBar());

            yield return(StateUtility.OnTowerClick(tower, eventData));
        }
コード例 #3
0
        public override IEnumerator OnTileClick(Tile tile, PointerEventData eventData)
        {
            yield return(GameManager.Instance.UiManager.HideCancelButton());

            if (eventData.button != PointerEventData.InputButton.Left ||
                !GameManager.Instance.GridHolder.Grid.BuildZone.Contains(tile))
            {
                yield return(StateUtility.ReturnToWait());
            }

            GameManager.Instance.SelectionManager.SelectedTile = tile;
            GameManager.Instance.StateMachine.SetState(new CreateTowerState());
        }
コード例 #4
0
        public override IEnumerator OnTileClick(Tile tile, PointerEventData eventData)
        {
            yield return(GameManager.Instance.UiManager.HideCancelButton());

            yield return(GameManager.Instance.UiManager.HideTowerActionBar());

            var actionId = GameManager.Instance.SelectionManager.SelectedTowerActionId;
            var action   = GameManager.Instance.SelectionManager.SelectedTower.ActiveActions[actionId] as TargetAction;

            if (action == null || !action.CorrectTarget(tile) || eventData.button != PointerEventData.InputButton.Left)
            {
                yield return(StateUtility.ReturnToWait());
            }
            else
            {
                GameManager.Instance.SelectionManager.SelectedTile = tile;
                GameManager.Instance.StateMachine.SetState(new TowerActionState());
            }
        }
コード例 #5
0
        public override IEnumerator OnCancel()
        {
            yield return(GameManager.Instance.UiManager.HideCancelButton());

            yield return(StateUtility.ReturnToWait());
        }
コード例 #6
0
        public override IEnumerator OnBuyTower(int id)
        {
            yield return(GameManager.Instance.UiManager.HideCancelButton());

            yield return(StateUtility.OnBuyTower(id));
        }
コード例 #7
0
 public override IEnumerator OnBuyTower(int id) => StateUtility.OnBuyTower(id);
コード例 #8
0
 public override IEnumerator OnTowerClick(IGridObject tower, PointerEventData eventData) =>
 StateUtility.OnTowerClick(tower, eventData);
コード例 #9
0
 public override IEnumerator OnEndTurn() => StateUtility.OnEndTurn();
コード例 #10
0
        public override IEnumerator OnCancel()
        {
            yield return(GameManager.Instance.UiManager.HideTowerActionBar());

            yield return(StateUtility.ReturnToWait());
        }
コード例 #11
0
        public override IEnumerator OnTileClick(Tile tile, PointerEventData eventData)
        {
            yield return(GameManager.Instance.UiManager.HideTowerActionBar());

            yield return(StateUtility.ReturnToWait());
        }