added comments and organized project files

This commit is contained in:
djkellerman
2025-03-28 17:39:07 -04:00
parent 22f44a3f20
commit a098e8c053
84 changed files with 183 additions and 214 deletions

View File

@@ -0,0 +1,24 @@
using UnityEngine;
using UnityEngine.InputSystem;
public class PlayerCardCreator : MonoBehaviour
{
public static PlayerCardCreator Instance;
public GameObject playerJoinCardPrefab;
private void Awake() // Ensures only one instance of PlayerCardCreator exists
{
if (Instance == null) Instance = this;
else
{
Destroy(gameObject);
}
}
public PlayerJoinCard CreateCard() // Creates a player join card
{
GameObject card = Instantiate(playerJoinCardPrefab, transform);
return card.GetComponent<PlayerJoinCard>();
}
}