public override IEnumerator OnEndTurn() { yield return(GameManager.Instance.UiManager.HideCancelButton()); yield return(GameManager.Instance.UiManager.HideTowerActionBar()); yield return(StateUtility.OnEndTurn()); }
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)); }
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()); }
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()); } }
public override IEnumerator OnCancel() { yield return(GameManager.Instance.UiManager.HideCancelButton()); yield return(StateUtility.ReturnToWait()); }
public override IEnumerator OnBuyTower(int id) { yield return(GameManager.Instance.UiManager.HideCancelButton()); yield return(StateUtility.OnBuyTower(id)); }
public override IEnumerator OnBuyTower(int id) => StateUtility.OnBuyTower(id);
public override IEnumerator OnTowerClick(IGridObject tower, PointerEventData eventData) => StateUtility.OnTowerClick(tower, eventData);
public override IEnumerator OnEndTurn() => StateUtility.OnEndTurn();
public override IEnumerator OnCancel() { yield return(GameManager.Instance.UiManager.HideTowerActionBar()); yield return(StateUtility.ReturnToWait()); }
public override IEnumerator OnTileClick(Tile tile, PointerEventData eventData) { yield return(GameManager.Instance.UiManager.HideTowerActionBar()); yield return(StateUtility.ReturnToWait()); }