private void EventSink_UnitAttackEvent(UnitAttackEventArgs args) { List <GamePiece> targets = new List <GamePiece>(); foreach (GameBoardTile tile in m_GameBoardRelative.CurrentlySelectedTiles) { if (tile.OccupyingPiece != null) { targets.Add(tile.OccupyingPiece); Debug.LogFormat("Tile Occupant ({0}): {1}", tile.BoardVector, tile.OccupyingPiece.gameObject.name); } } if (m_CurrentFocusPiece.TestMode) { m_GameBoardRelative.ClearCurrentSelections(); m_CurrentFocusPiece.FinalizeAttack(targets.ToArray(), args.Tile); } else if (m_CurrentFocusPiece.UnderLocalControl) { ClientManager.Instance.SendAttackTargetSyncCommand (MatchHandler.CurrentMatch.MatchIdentity, m_CurrentFocusPiece.NetworkIdentity, m_CurrentFocusPiece.AttackRating, targets.ToArray(), args.Tile.BoardVector); } if (m_CurrentFocusPiece.TestMode) { TurnStateHandler.FinishStep(); } }
internal void HandleTurnStepChange(TurnStep turnStep) { switch (turnStep) { case TurnStep.End: { if (!IsActivelyEngaged) { m_ParentBoard.ClearCurrentSelections(); m_Handler.ClearFocusPiece(); } break; } default: { Debug.LogFormat("Turn Step Case Invalid: {0}", turnStep.ToString()); break; } } }