38 lines
743 B
C#
38 lines
743 B
C#
using TMPro;
|
|
using UnityEngine;
|
|
|
|
public class ScriptMenuChangeNumberPlayers : MonoBehaviour
|
|
{
|
|
private TextMeshProUGUI text;
|
|
|
|
private void Awake()
|
|
{
|
|
text = gameObject.GetComponentInChildren<TextMeshProUGUI>();
|
|
}
|
|
|
|
private void Start()
|
|
{
|
|
if (GameSetting.OnePlayer)
|
|
{
|
|
text.text = "One Player";
|
|
}
|
|
else
|
|
{
|
|
text.text = "Two Player";
|
|
}
|
|
}
|
|
|
|
public void ChageNumberPlayersScript()
|
|
{
|
|
if (GameSetting.OnePlayer)
|
|
{
|
|
GameSetting.OnePlayer = false;
|
|
text.text = "Two Player";
|
|
}
|
|
else
|
|
{
|
|
GameSetting.OnePlayer = true;
|
|
text.text = "One Player";
|
|
}
|
|
}
|
|
} |