31 lines
765 B
C#
31 lines
765 B
C#
using UnityEngine;
|
|
using UnityEngine.XR.Interaction.Toolkit;
|
|
|
|
public class FirstMenuScript : MonoBehaviour
|
|
{
|
|
[SerializeField] private GameObject _UIMenu;
|
|
[SerializeField] private ActionBasedContinuousMoveProvider _Move;
|
|
[SerializeField] private CharacterController _CharacterController;
|
|
|
|
public void Init(ActionBasedContinuousMoveProvider move, CharacterController cc)
|
|
{
|
|
_UIMenu = gameObject;
|
|
_Move = move;
|
|
_CharacterController = cc;
|
|
}
|
|
|
|
// Start is called before the first frame update
|
|
|
|
public void UserAgree()
|
|
{
|
|
_Move.enabled = true;
|
|
_CharacterController.enabled = true;
|
|
_UIMenu.SetActive(false);
|
|
}
|
|
|
|
public void UserDisagree()
|
|
{
|
|
Application.Quit();
|
|
}
|
|
}
|