chunk 1: core gameplay scripts scenes runtime assets

This commit is contained in:
2026-04-06 11:02:34 +03:00
parent fa0388bc79
commit 0d11a097d8
703 changed files with 2292651 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
using UnityEngine;
using UnityEngine.UI;
using TMPro;
public class ToggleAIPlayer : MonoBehaviour
{
public TMP_Text buttonText;
private string currentState = "AI"; // Default state is AI.
private void Start()
{
UpdateButtonText();
buttonText.text = "AI";
}
public void OnButtonClick()
{
// Toggle between 'AI' and 'Player'.
if (currentState == "AI")
{
currentState = "LOCAL";
}
else if(currentState == "LOCAL")
{
currentState = "AI";
}
UpdateButtonText();
}
private void UpdateButtonText()
{
buttonText.text = currentState;
}
}