纳金网

标题: GUI开始菜单 [打印本页]

作者: 晃晃    时间: 2011-8-16 08:04
标题: GUI开始菜单
@script ExecuteInEditMode()

var gSkin:GUISkin;

var backdrop:Texture2D;

private var isLoading=false;

function OnGUI () {

   if(gSkin)

     

      GUI.skin=gSkin;

   

else



        Debug.Log("StartMenuGUI:GUI Skin object missing!") ;

  

  

var backgroundStyle:GUIStyle=new GUIStyle();

backgroundStyle.normal.background=backdrop;

GUI.Label(Rect((Screen.width-(Screen.height*2))*0.75,0,Screen.height*2,Screen.height),"",

backgroundStyle);

GUI.Label(Rect((Screen.width/2)-197,50,400,100),"Lerpz Escapes","mainMenuTitle");

if(GUI.Button(Rect((Screen.width/2)-70,Screen.height-160,140,70),"lay"))

{

     isLoading=***e;

    Application.LoadLevel("TheGame");
var isWebPlayer=(Application.platform==RuntimePlatform.OSXWebPlayer||Application.platform==RuntimePlatform.WindowsWebPlayer);
if(!isWebPlayer)

{
if(GUI.Button(Rect((Screen.width/2)-70,Screen.height-80,140,70),"Quit"))
             Application.Quit();

}

if(isLoading)

             GUI.Label(Rect((Screen.width/2)-110,(Screen.height/2)-60,400,70),"Loading...",

    "mainMenuTitle");
}

}
作者: tc    时间: 2012-2-17 23:30
既来之,则看之!

作者: 菜刀吻电线    时间: 2012-3-4 23:24
非常感谢,管理员设置了需要对新回复进行审核,您的帖子通过审核后将被显示出来,现在将转入主题

作者: 奇    时间: 2012-3-24 23:18
不错不错,收藏了

作者: C.R.CAN    时间: 2012-4-4 23:19
已阵亡的 蝶 随 风 舞 说过  偶尔按一下 CTRL A 会发现 世界还有另一面

作者: 晃晃    时间: 2012-8-18 00:04
不错不错,收藏了

作者: tc    时间: 2013-2-11 23:28
先垫一块,再说鸟

作者: C.R.CAN    时间: 2013-3-10 23:35
提醒猪猪,千万不能让你看见





欢迎光临 纳金网 (http://go.narkii.com/club/) Powered by Discuz! X2.5