Skip to content
Permalink
2077f72d03
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 34 lines (26 sloc) 817 Bytes
using UnityEngine;
using System.Collections;
public class Button : MonoBehaviour {
public Texture btnTexture;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
void OnGUI() {
if (!btnTexture) {
Debug.LogError("Please assign a texture on the inspector");
return;
}
if (GUI.Button(new Rect(350, 400, 90, 90), btnTexture, GUIStyle.none)){
Debug.Log("Clicked the button with an image");
// TIANZHU!!!! Put scene name here for main game! Replace TeamSplash!!!
Application.LoadLevel ("LVL1");
}
if (GUI.Button(new Rect(450, 400, 90, 90), "Credits")){
Debug.Log("Clicked the button with text");
Application.LoadLevel ("CreditsPage");
}
}
}