该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
using UnityEngine;
using System.Collections;
public class Button : MonoBehaviour {
Texture2D texSingle;
Object[] texAll;
//var windowRect;
// Use this for initialization
void Start () {
//var mySkin:GUIskin;
//windowRect=Rect(200,200,200,200);
texAll=Resources.LoadAll("木板");
}
// Update is called once per frame
void Update () {
}
void OnGUI()
{
GUI.color = Color.black;
GUI.backgroundColor = Color.clear;
GUI.skin.button.fontSize=25;
GUI.skin.button.fontStyle = FontStyle.Bold;
//GUI.skin = mySkin;
if (GUI.Button (new Rect (630, 280, 120, 50), "开始游戏")) {
Application.LoadLevel(1);
}
//normal color A=0;
if (GUI.Button (new Rect (630, 350, 120, 50), "故事简介")) {
texSingle=(Texture2D)texAll[0];
GUI.DrawTexture(new Rect(630, 350, 120, 50),(Texture2D)texSingle,ScaleMode.StretchToFill,true,0);
}
//GUI.DrawTexture (new Rect (110, 130, 150, 150),(Texture2D) texAll, ScaleMode.StretchToFill, true, 0);
if (GUI.Button (new Rect (630, 440, 120, 30), "玩法说明")) {
Application.LoadLevel (1);
}
if (GUI.Button (new Rect (630, 500, 120, 30), "退出游戏")) {
Application.Quit();
}
}
}