- 2
- 0
- 约3.35千字
- 约 12页
- 2016-08-23 发布于河南
- 举报
unity3d游戏开发之GUI基础
今天为之前做的飞机大战添加显示生命值和分数的功能,用到了GUI,下面我来简单梳理一下GUI的知识点
? ? ??? //有点击效果
? ? ? ? // GUI.Button(new Rect(10, 10, 100, 20), GUI练习);
? ? ? ??
? ? ? ? // GUI.Button(new Rect(10, 40, img.width, img.height), img);//图片效果同上
? ? ? ??
? ? ? ??//点击效果有提示
? ? ? ? //GUI.Button(new Rect(10, 10, 100, 20), new GUIContent(GUI练习,GG) );? ??
? ? ? ? //GUI.Label (new Rect (130,30,50,20),GUI.tooltip );
? ? ? ??
? ? ? ??//按钮上面有图片
? ? ? ? // GUI .Button (new Rect (10,10,100,20),new GUIContent(GUI练习,img2) );
? ? ? ??
? ? ? ??//RepeatButton双击按钮
? ? ? ? // GUI.RepeatButton(new Rect(10, 10, 100, 20), Hello World!);
? ?
原创力文档

文档评论(0)