29 lines
541 B
C#
29 lines
541 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
public class MyGameManager : MonoBehaviour
|
|
{
|
|
public static MyGameManager Instance = null;
|
|
public GameObject SelectionPanel;
|
|
public int playerIndex = 0;
|
|
private void Awake()
|
|
{
|
|
if (Instance != null && Instance != this)
|
|
{
|
|
Destroy(this);
|
|
}
|
|
else
|
|
{
|
|
Instance = this;
|
|
}
|
|
DontDestroyOnLoad(gameObject);
|
|
}
|
|
|
|
public void SetPlayerIndex(int index)
|
|
{
|
|
playerIndex = index;
|
|
}
|
|
|
|
|
|
}
|