48 lines
820 B
C#
48 lines
820 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
namespace RND
|
|
{
|
|
|
|
public class TutorialWindow : ParameterWindow<InputTutorialType>
|
|
{
|
|
[SerializeField] private InputTutorialItem[] _items;
|
|
|
|
protected override void OnInit()
|
|
{
|
|
foreach (InputTutorialItem item in _items)
|
|
{
|
|
item.View.SetActive(false);
|
|
}
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
if(Input.anyKeyDown)
|
|
Close();
|
|
}
|
|
|
|
protected override void OnShow(InputTutorialType type)
|
|
{
|
|
foreach (InputTutorialItem item in _items)
|
|
{
|
|
if(item.Type == type)
|
|
item.View.SetActive(true);
|
|
}
|
|
}
|
|
}
|
|
public enum InputTutorialType
|
|
{
|
|
HOLD_TO_MOVE = 0
|
|
}
|
|
|
|
[Serializable]
|
|
public class InputTutorialItem
|
|
{
|
|
public InputTutorialType Type;
|
|
public GameObject View;
|
|
}
|
|
|
|
}
|
|
|