- Home /
go to definition failed either because the caret is already at the definition or because an explicit definition could not be found
pragma strict
ar guanYuWindowMain = false;
var sheZhiWindow1 = false;
var bangZhuWindow2 =false;
var lianXikefuWindow2 =false;
var windowMargin: int = 30;
var anniu1=true;
var anniu2=true;
var shezhi:GUISkin;
var kaishi : GUISkin;
var tuichu : GUISkin;
var chuangkou : GUISkin;
var guanbi : GUISkin;
var img : Texture2D;
private var windowRectMain = Rect (windowMargin, windowMargin, 306, Screen.height-windowMargin*2);
private var windowRect1 = Rect (306+windowMargin*2, windowMargin, 306, Screen.height-windowMargin*2);
private var windowRect2 = Rect (306+306+windowMargin*3, windowMargin, Screen.width-306-306-windowMargin*4, Screen.height-windowMargin*2);
function GuanYuwindowMain (windowID : int) { GUILayout.Space(8); GUI.skin=chuangkou; GUILayout.Label ("组员,\n2016年11月"); GUI.skin=guanbi; if (GUI.Button(Rect(124,258,50,30),"关闭")){ if (guanYuWindowMain) guanYuWindowMain=false; else guanYuWindowMain=true; }
}
function BangZhuWindow2 (windowID : int)
{
GUILayout.Space(8);
GUI.skin=chuangkou;
GUILayout.Label("操作方法,关卡设置说明\n利用计算机及各种传感设备构造一种信息环境,人能够高效,自然地对此信息环境进行感知、交互,产生沉浸感或达到某种信息传达的目的, ");
GUI.skin=guanbi;
if (GUI.Button(Rect(124,258,50,30),"关闭")){
if (bangZhuWindow2)
bangZhuWindow2=false;
else
bangZhuWindow2=true;
}
}
function SheZhiWindow1 (windowID : int)
{
GUILayout.Space(8);
GUILayout.BeginVertical();
GUILayout.Space(50);
GUILayout.Toggle(anniu1,'音乐开');
GUILayout.Space(70);
GUILayout.Toggle(anniu2,'音效开');
GUILayout.EndVertical();
GUI.skin=guanbi;
if (GUI.Button(Rect(124,258,50,30),"关闭")){
if (sheZhiWindow1 )
sheZhiWindow1 =false;
else
sheZhiWindow1 =true;
}
}
function OnGUI ()
{
GUI.skin =shezhi;
if (guanYuWindowMain)
windowRectMain = GUI.Window (0, windowRectMain,GuanYuWindowMain,"关于");
if (bangZhuWindow2 )
windowRectMain = GUI.Window (0, windowRectMain,BangZhuWindow2, "帮助");
if (sheZhiWindow1)
windowRectMain= GUI.Window (0, windowRectMain, SheZhiWindow1, "设置");
GUI.Label(Rect(0,0,Screen.width-306-306-windowMargin*4, Screen.height-windowMargin*2),img);
GUILayout.BeginVertical();
GUILayout.Label("");
GUILayout.Space(Screen.height-windowMargin*2);
GUILayout.BeginHorizontal();
GUILayout.Space(60);
GUILayout.BeginVertical();
if( GUILayout.Button("设置",GUILayout.Width(60),GUILayout.Height(30)))
{
if (sheZhiWindow1 )
sheZhiWindow1 =false;
else
sheZhiWindow1 =true;
}
if( GUILayout.Button("关于",GUILayout.Width(60),GUILayout.Height(30)))
{
if (guanYuWindowMain )
guanYuWindowMain =false;
else
guanYuWindowMain =true;
}
if( GUILayout.Button("帮助",GUILayout.Width(60),GUILayout.Height(30)))
{
if (bangZhuWindow2 )
bangZhuWindow2 =false;
else
bangZhuWindow2 =true;
}
}
{
GUILayout.EndVertical();
GUI.skin=kaishi;
GUILayout.Space(Screen.width-400);
GUILayout.BeginVertical();
GUILayout.Label("");
GUILayout.Space(20);
GUILayout.BeginHorizontal();
if( GUILayout.Button("",GUILayout.Width(120),GUILayout.Height(60))) {
Application.LoadLevel("1");
}
GUI.skin=tuichu;
if( GUILayout.Button("",GUILayout.Width(100),GUILayout.Height(60))) {
Application.Quit();
}
GUILayout.EndHorizontal();
GUILayout.EndVertical();
GUILayout.EndHorizontal();
GUILayout.EndVertical();
}
Your answer
![](https://koobas.hobune.stream/wayback/20220612102042im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Date File was edited? 0 Answers
Load a different sky box in each world 3 Answers
Unity UI Builder Toggle can't change checkmark size 1 Answer
Angle between vectors - calculation 2 Answers