Ejemplo n.º 1
0
 // ----------------------------------------------------------------
 //  Makin' Moves
 // ----------------------------------------------------------------
 public void ExecuteMoveAttempt(Vector2Int dir)
 {
     if (BoardUtils.MayExecuteMove(this, dir))
     {
         // Clear out the list NOW.
         objectsAddedThisMove.Clear();
         // Reset PrevMoveDelta.
         ResetTilesPrevMoveDelta();
         // Move players!
         BoardUtils.ExecuteMove(this, dir);
         // Tell all other Tiles!
         for (int i = 0; i < allTiles.Count; i++)
         {
             allTiles[i].OnPlayerMoved();
         }
         // Update Goals!
         //foreach (IGoalObject igo in goalObjects) { igo.UpdateIsOn (); }
         AreGoalsSatisfied = GetAreGoalsSatisfied();
         // Dispatch event!
         GameManagers.Instance.EventManager.OnBoardExecutedMove(this);
     }
 }