Add lives display

This commit is contained in:
RochesterX
2025-03-07 16:25:59 -05:00
parent f146b06e3c
commit c7fede9552
12 changed files with 1795 additions and 2 deletions

View File

@@ -11,6 +11,7 @@ public class GameManager : MonoBehaviour
public event GameEvent StartGameEvent;
public event GameEvent EndGameEvent;
public static List<GameObject> players = new List<GameObject>();
public static List<Color> playerColors = new List<Color>();
private void Awake()
{

View File

@@ -75,6 +75,7 @@ public class PlayerManager : MonoBehaviour
Color color = playerColors[(GameManager.players.Count - 1) % playerColors.Count];
float tint = Mathf.Floor((GameManager.players.Count - 1) / playerColors.Count);
color = (color + color + Color.white * tint) / (tint + 2);
GameManager.playerColors.Add(color);
ApplyColor(player, color);
ApplyColor(cards[GameManager.players.IndexOf(player)].playerPreview, color);
}