public void SetCoords(CheckerCoords newCoords) { _coords = newCoords; // Reached end if (IsWhite ? newCoords.Y == 8 : newCoords.Y == 1 && !IsQueen) { BecomeQueen(); } transform.position = _board.CheckerToWorldCoords(newCoords); }
void ShowAvailableMoves(List <CheckerMove> moves) { ClearAvailableMoves(); Debug.Log("Showing moves"); foreach (var move in moves) { var ghost = _objectPooler.GetPooledObject(0); ghost.transform.position = _board.CheckerToWorldCoords(move.destinationCoords); ghost.SetActive(true); _ghosts.Add(ghost, move); } }
void CheckOutput() { try { var t = output.text; var split = t.Split(new [] { " " }, StringSplitOptions.RemoveEmptyEntries); for (int i = 0; i < split.Length; ++i) { CheckerCoords coords = TextToCoords(split[i]); touchMoveProvider.Raycast(_board.CheckerToWorldCoords(coords)); } } catch (Exception e) { androidDebug.AddLog(e.ToString()); } }