37 lines
794 B
C#
37 lines
794 B
C#
using Lean.Gui;
|
|
using UnityEngine;
|
|
using UnityEngine.Events;
|
|
|
|
namespace RND
|
|
{
|
|
|
|
public class JoystickWindow : ParameterlessWindow
|
|
{
|
|
public LeanJoystick Joystick => _joystick;
|
|
|
|
[SerializeField] private LeanJoystick _joystick;
|
|
[SerializeField] private GameObject _tutorial;
|
|
|
|
private void Awake()
|
|
{
|
|
_joystick.OnDown.AddListener(OnJoystickDown);
|
|
_joystick.UpTransitions.Begin();
|
|
}
|
|
|
|
private void OnJoystickDown()
|
|
{
|
|
if (_tutorial.gameObject.activeSelf)
|
|
HideTutorial();
|
|
}
|
|
|
|
public void ShowTutorial()
|
|
{
|
|
_tutorial.SetActive(true);
|
|
}
|
|
|
|
public void HideTutorial()
|
|
{
|
|
_tutorial.SetActive(false);
|
|
}
|
|
}
|
|
} |