Beispiel #1
0
    private void SetEdgeColorBonus(int edgeIndex)
    {
        CardGrid otherCard = GetAdjacentCard(edgeIndex);

        activeCard.SetEdgeColor((edgeIndex + 4 - activeCard.rotation) % 4, Color.green);
        otherCard?.SetEdgeColor((edgeIndex + 6 - otherCard.rotation) % 4, Color.green);
    }
Beispiel #2
0
    private void SetEdgeColorPenalty(int edgeIndex)
    {
        CardGrid otherCard = GetAdjacentCard(edgeIndex);

        activeCard.SetEdgeColor((edgeIndex + 4 - activeCard.rotation) % 4, Color.red);
        otherCard?.SetEdgeColor((edgeIndex + 6 - otherCard.rotation) % 4, Color.red);
    }
Beispiel #3
0
 private void ResetEdgeAndNeighborsColor()
 {
     for (int i = 0; i < 4; i++)
     {
         CardGrid otherCard = GetAdjacentCard(i);
         activeCard.SetEdgeColor((i + 4 - activeCard.rotation) % 4, Color.black);
         otherCard?.SetEdgeColor((i + 6 - otherCard.rotation) % 4, Color.black);
     }
 }