Move scripts
This commit is contained in:
24
Assets/Scripts/CreatePlayerJoinCards.cs
Normal file
24
Assets/Scripts/CreatePlayerJoinCards.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
public class PlayerCardCreator : MonoBehaviour
|
||||
{
|
||||
public static PlayerCardCreator Instance;
|
||||
|
||||
public GameObject playerJoinCardPrefab;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (Instance == null) Instance = this;
|
||||
else
|
||||
{
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
public PlayerJoinCard CreateCard(PlayerInput input)
|
||||
{
|
||||
GameObject card = Instantiate(playerJoinCardPrefab, transform);
|
||||
return card.GetComponent<PlayerJoinCard>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user