-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathUIButtonStartGame.cs
37 lines (32 loc) · 959 Bytes
/
UIButtonStartGame.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
using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;
/// <summary>
/// A class that deals with Load Level events.
/// </summary>
public class UIButtonStartGame : MonoBehaviour {
/// <summary>
/// Load a level (scene) by name..
/// </summary>
public void loadLevelEasy() {
GameSettings.difficulty = GameSettings.gameDifficulties.Easy;
GameSettings.showIntroLevelMessage = true;
SceneManager.LoadScene ("Level1");
}
/// <summary>
/// Load a level (scene) by name..
/// </summary>
public void loadLevelNormal() {
GameSettings.difficulty = GameSettings.gameDifficulties.Normal;
GameSettings.showIntroLevelMessage = true;
SceneManager.LoadScene ("Level1");
}
/// <summary>
/// Load a level (scene) by name..
/// </summary>
public void loadLevelHard() {
GameSettings.difficulty = GameSettings.gameDifficulties.Hard;
GameSettings.showIntroLevelMessage = true;
SceneManager.LoadScene ("Level1");
}
}