纳金网
标题:
Unity3d弹窗的实现方式
[打印本页]
作者:
王者再临
时间:
2013-7-19 15:49
标题:
Unity3d弹窗的实现方式
using UnityEngine;
using System.Collections;
public class GUIXX : MonoBehaviour {
// Use this for initialization
//~ Rect windowRect;
ArrayList windowRect=new ArrayList();
void Start () {
}
// Update is called once per frame
void Update () {
}
void OnGUI()
{
if (GUILayout.Button ("Add Window"))
{
windowRect.Add(new Rect(200+windowRect.Count*40,200+windowRect.Count*50,120,56));
}
for(int i=0;i<windowRect.Count;i++)
{
windowRect= GUILayout.Window (i, (Rect)windowRect, DoMyWindow, "My Window");
}
}
void DoMyWindow (int windowID) {
if (GUILayout.Button ("Hello World"))
{
windowRect.RemoveAt(windowID);
}
GUI.DragWindow(new Rect(0,0, 10000, 500));
}
}
作者:
Asen
时间:
2013-7-19 21:05
楼主威武啊
作者:
h798644409
时间:
2013-8-2 15:42
http://www.baojihua.com/?u=452422845这里有很多资源,很多教程,很适合的
欢迎光临 纳金网 (http://rs.narkii.com/club/)
Powered by Discuz! X2.5