Exemplo n.º 1
0
 private void checkMove(PlayerPiece currentPiece)
 {
     if (GameManager.Instance.gameType == GameManager.GameType.Simple)
     {
         PathChecker.CheckResult pathCheckRes = PathChecker.Instance.isPathValidForPlayerPiece(this, currentPiece);
         bool pathValid = pathCheckRes == PathChecker.CheckResult.ValidPath;
         currentPiece.showValidPath(pathValid);
         Debug.Log("PATH CHECKER - Res: " + pathCheckRes.ToString() + " - " + currentPiece.toDebugStr());
         if (pathValid)
         {
             PathChecker.Instance.sortPath(currentPiece);
             Debug.Log("SORTED PATH - " + currentPiece.toDebugStr());
         }
         PlayersManager.Instance.onPlayerPathDefined(pathValid);
     }
 }