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>();
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/CreatePlayerJoinCards.cs.meta
Normal file
2
Assets/Scripts/CreatePlayerJoinCards.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4faf59678eb534fabab364215e093fa0
|
||||
13
Assets/Scripts/GameManager.cs
Normal file
13
Assets/Scripts/GameManager.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class GameManager : MonoBehaviour
|
||||
{
|
||||
public enum GameMode
|
||||
{
|
||||
freeForAll,
|
||||
teamDeathmatch,
|
||||
captureTheFlag
|
||||
}
|
||||
|
||||
public static GameMode gameMode = GameMode.freeForAll;
|
||||
}
|
||||
2
Assets/Scripts/GameManager.cs.meta
Normal file
2
Assets/Scripts/GameManager.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d6e4006937b044c9ab3de25a7ab68162
|
||||
14
Assets/Scripts/PlayerJoinCard.cs
Normal file
14
Assets/Scripts/PlayerJoinCard.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
public class PlayerJoinCard : MonoBehaviour
|
||||
{
|
||||
public GameObject playerPreview;
|
||||
public int playerNumber;
|
||||
public TextMeshProUGUI playerNumberText;
|
||||
|
||||
void Start()
|
||||
{
|
||||
playerNumberText.text = playerNumber.ToString();
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/PlayerJoinCard.cs.meta
Normal file
2
Assets/Scripts/PlayerJoinCard.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d858973e2b6054f4281e30a4db77c8fe
|
||||
Reference in New Issue
Block a user