Пример #1
0
 private void DisplayPullerInfluenceWest(int distance, bool shouldHighlight)
 {
     if (!westWall && westNeighbor && distance > 0)
     {
         NetworkedGridElement west = westNeighbor.GetComponent <NetworkedGridElement>();
         if (shouldHighlight)
         {
             west.ChangeColor(NetworkedGridMenu.pullColor);
             if (west.piece && (west.piece.GetComponent <NetworkedGamePiece>() is NetworkedUnit || west.piece.GetComponent <NetworkedGamePiece>() is NetworkedTrap))
             {
                 west.isHighlighted = shouldHighlight;
             }
             else
             {
                 west.GetComponent <Image>().color += new Color(0.2F, 0.2F, 0.2F);
             }
         }
         else
         {
             west.ChangeColor(NetworkedMenu.defaultColor);
         }
         west.DisplayPullerInfluenceWest(distance - 1, shouldHighlight);
     }
 }
Пример #2
0
 private void DisplayPullerInfluenceSouth(int distance, bool shouldHighlight)
 {
     if (!southWall && southNeighbor && distance > 0)
     {
         NetworkedGridElement south = southNeighbor.GetComponent <NetworkedGridElement>();
         if (shouldHighlight)
         {
             south.ChangeColor(NetworkedGridMenu.pullColor);
             if (south.piece && (south.piece.GetComponent <NetworkedGamePiece>() is NetworkedUnit || south.piece.GetComponent <NetworkedGamePiece>() is NetworkedTrap))
             {
                 south.isHighlighted = shouldHighlight;
             }
             else
             {
                 south.GetComponent <Image>().color += new Color(0.2F, 0.2F, 0.2F);
             }
         }
         else
         {
             south.ChangeColor(NetworkedMenu.defaultColor);
         }
         south.DisplayPullerInfluenceSouth(distance - 1, shouldHighlight);
     }
 }