Implemented How To Play Pop up on start
This commit is contained in:
parent
5fd3e5bc73
commit
c103ffb339
20 changed files with 558 additions and 24 deletions
|
|
@ -20,6 +20,8 @@ public class DungeonSelectMenuController : MonoBehaviour
|
|||
{
|
||||
VisualElement root = GetComponent<UIDocument>().rootVisualElement;
|
||||
|
||||
Button rules = root.Q<Button>("Rules");
|
||||
rules.clicked += UIEvents.ShowRules;
|
||||
_dungeonThumbnail = root.Q<VisualElement>("DungeonThumbnail");
|
||||
_next = root.Q<Button>("Next");
|
||||
_next.clicked += NextClicked;
|
||||
|
|
|
|||
22
PuzzleGameProject/Assets/Scripts/UI/RulesPageController.cs
Normal file
22
PuzzleGameProject/Assets/Scripts/UI/RulesPageController.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2a5aa3e2c35674149847602fe21313a4
|
||||
Loading…
Add table
Add a link
Reference in a new issue