-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainMenuCtrl.cs
74 lines (54 loc) · 1.28 KB
/
MainMenuCtrl.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.UI;
/// <summary>
/// MenuManager handles the setup and switching between canvas views.
/// </summary>
public class MainMenuCtrl : MonoBehaviour
{
#region Singleton
public static MainMenuCtrl instance;
void Awake()
{
if (instance == null)
instance = this;
else
Destroy(this);
menuButtons.ForEach(x => x.gameObject.SetActive(false));
}
#endregion
public List<Button> menuButtons; // list of menu buttons
void Start()
{
//dataCtrl = DataCtrl.instance;
//SwitchCanvas(MenuType.MainMenu);
//ButtonLayout();
}
/// <summary>
/// Handles callbacks on the continue game button.
/// </summary>
public void Continue()
{
}
/// <summary>
/// Handles callbacks on the new game button.
/// </summary>
public void NewGame()
{
}
/// <summary>
/// Handles callbacks on the game options button.
/// </summary>
public void Options()
{
}
/// <summary>
/// Handles callbacks on the quit game button.
/// </summary>
public void Quit()
{
Application.Quit();
}
}