首页 > 代码库 > CR开发笔记-5主界面GUI的进一步代码完善

CR开发笔记-5主界面GUI的进一步代码完善

新增代码

 if (winID == 2)        {            GUILayout.BeginVertical("box");            GUILayout.Box("日记",GUILayout.Height(fullHeight/8));            GUILayout.BeginHorizontal("box");            if (GUILayout.Button("蓝光隧道I", GUILayout.Height(fullHeight / 5)))            {                Application.LoadLevel("BlueWayIscene");            }            if(GUILayout.Button("蓝光隧道II", GUILayout.Height(fullHeight / 5)))            {                Application.LoadLevel("BlueWayIIscene");            }            if(GUILayout.Button("蓝光隧道III", GUILayout.Height(fullHeight / 5)))            {                Application.LoadLevel("BlueWayIIIscene");            }            if(GUILayout.Button("蓝光隧道IV", GUILayout.Height(fullHeight / 5)))            {                Application.LoadLevel("BlueWayIVscene");            }            GUILayout.EndHorizontal();            GUILayout.BeginHorizontal("box");            if(GUILayout.Button("紫光星雨I", GUILayout.Height(fullHeight / 5)))            {                Application.LoadLevel("PurpleRainIscene");            }            if(GUILayout.Button("紫光星雨II", GUILayout.Height(fullHeight / 5)))            {                Application.LoadLevel("PurpleRainIIscene");            }            if(GUILayout.Button("紫光星雨III", GUILayout.Height(fullHeight / 5)))            {                Application.LoadLevel("PurpleRainIIIscene");            }            if(GUILayout.Button("紫光星雨IV", GUILayout.Height(fullHeight / 5)))            {                Application.LoadLevel("PurpleRainIVscene");            }            GUILayout.EndHorizontal();            GUILayout.BeginHorizontal("box", GUILayout.Height(fullHeight / 5));            if(GUILayout.Button("红光星河I", GUILayout.Height(fullHeight / 5)))            {                Application.LoadLevel("RedRainIscene");            }            if (GUILayout.Button("红光星河II", GUILayout.Height(fullHeight / 5)))            {                Application.LoadLevel("RedRainIIscene");            }            if(GUILayout.Button("红光星河III", GUILayout.Height(fullHeight / 5)))            {                Application.LoadLevel("RedRainIIIscene");            }            if(GUILayout.Button("红光星河IV", GUILayout.Height(fullHeight / 5)))            {                Application.LoadLevel("RedRainIVscene");            }            GUILayout.EndHorizontal();            GUILayout.EndVertical();            if (GUI.Button(rtLevelWinBtn,"关闭"))            {                stLevelWin = false;                WindowsExist = false;            }        }

效果图如上

今日梗

众人皆说程序员好,赚得多死得早