22 lines
459 B
C#
22 lines
459 B
C#
using System;
|
|
using DungeonSelection;
|
|
using UnityEngine;
|
|
using UnityEngine.UIElements;
|
|
|
|
public class RulesPageController : MonoBehaviour
|
|
{
|
|
private void OnEnable()
|
|
{
|
|
UIEvents.CloseRules += Close;
|
|
|
|
VisualElement root = GetComponent<UIDocument>().rootVisualElement;
|
|
|
|
Button close = root.Q<Button>("Close");
|
|
close.clicked += Close;
|
|
}
|
|
|
|
private void Close()
|
|
{
|
|
gameObject.SetActive(false);
|
|
}
|
|
}
|