feat: init AI (#60)

This commit is contained in:
2025-05-15 07:12:46 +02:00
committed by GitHub
parent 0263f6b3b0
commit bde6ea3a43
12 changed files with 508 additions and 16 deletions

19
Assets/AI.cs Normal file
View File

@ -0,0 +1,19 @@
using UnityEngine;
using UnityEngine.UI;
public class AI : MonoBehaviour
{
public Toggle AIToggle;
public Player player;
public void OnAiChange()
{
player.IsAI = AIToggle.isOn;
}
public void Awake()
{
AIToggle = GetComponent<Toggle>();
AIToggle.isOn = player.IsAI;
}
}