摘要: #pragma strictvar scrollPosition:Vector2;function Start () { scrollPosition[0]=50; scrollPosition[1]=50;}function Update () {}function OnGUI(){ scrollPosition=GUI.BeginScrollView(Rect(0,0,200,200),scrollPosition, Rect(0,0,Screen.width,300),true,true); GUI.Label(Rect(100,40,Screen.width,30),"测.. 阅读全文
posted @ 2013-08-27 14:56 yufenghou 阅读(384) 评论(0) 推荐(0)
摘要: #pragma strictprivate var editUsername:String;private var editPassword:String;private var editShow:String;function Start () { //初始化赋值 editShow="请您输入正确的用户名与密码"; editUsername="输入用户名"; editPassword="请输入密码";}function Update () {}function OnGUI(){ GUI.Label(Rect(10,10,Screen 阅读全文
posted @ 2013-08-27 11:45 yufenghou 阅读(253) 评论(0) 推荐(0)
摘要: #pragma strictvar buttonTexture:Texture2D;private var str:String;private var frameTime:int;function Start () {//初始化赋值 str="点击按钮吧亲";}function Update () {}function OnGUI(){ //显示提示信息内容 GUI.Label(Rect(10,10,Screen.width,30),str); if(GUI.Button(Rect(10,50,buttonTexture.width,buttonTexture... 阅读全文
posted @ 2013-08-27 11:17 yufenghou 阅读(529) 评论(0) 推荐(0)
摘要: #pragma strictvar str:String;//接收外部复制贴图var imageTexture:Texture;private var imageWidth:int;private var imageHeight:int;private var screenWidth:int;private var screenHeight:int;function Start () { //得到屏幕宽高 screenWidth=Screen.width; screenHeight=Screen.height; //得到图片宽高 imageWidth=imageTexture.width; . 阅读全文
posted @ 2013-08-27 10:59 yufenghou 阅读(1506) 评论(0) 推荐(0)