-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuttonHowScript.cs
49 lines (42 loc) · 1.33 KB
/
buttonHowScript.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
using UnityEngine;
using System.Collections;
public class buttonHowScript : MonoBehaviour {
public Texture2D normalTexture;
public Texture2D hoverTexture;
public GUITexture startButton;
public GUITexture aboutButton;
public GUITexture leaderboardsButton;
public GUIText titleText;
public UnityEngine.UI.Text copyrightText;
public GUITexture howToPlayScreen;
public GUITexture backToMainButton;
// Use this for initialization
void Start () {
howToPlayScreen.enabled = false;
backToMainButton.enabled = false;
}
// Update is called once per frame
void Update () {
}
void OnMouseDown() {
//this.GetComponent<GUITexture>().texture = hoverTexture;
this.GetComponent<GUITexture>().texture = normalTexture;
startButton.enabled = false;
aboutButton.enabled = false;
leaderboardsButton.enabled = false;
titleText.enabled = false;
copyrightText.enabled = false;
this.GetComponent<GUITexture>().enabled = false;
howToPlayScreen.enabled = true;
backToMainButton.enabled = true;
//Application.LoadLevel("Main");
}
void OnMouseEnter()
{
this.GetComponent<GUITexture>().texture = hoverTexture;
}
void OnMouseExit()
{
this.GetComponent<GUITexture>().texture = normalTexture;
}
}