UGUI&&Animator模块知识点随记
2.给Button添加事件关联时,函数不能带有yield WaitForSeconds (waitTime);(js)必须使用协程
function OnMouseDown(waitTime:float) {
yield WaitForSeconds (waitTime);}
StartCoroutine(OnMouseDown(0.35));
3.Input.GetKey(KeyCode.Q))与Input.GetKeyDown(KeyCode.Escape)
4.Mathf.Lerp. lerp差值 transform.position.x = Mathf.Lerp(min:float,max:float,(Time.time - i:float)*speed);数学差值函数。
5.创建一个空物体如果他的Scale,x=0,y=0,那么这个物体的子物体改变子物体的position,他的位置也不会改变。
6.animation组件和animator组件的区别,,animator是动画状态机,animation是它子集。
7.animator的trigger变量。a.animator.settrigger("name");执行时为真,下一句自动为假。
8.状态树动画转换控制,,float h = Input.GetAxis("Horizontal"); float DirectionDampTime = 0.25; animator.SetFloat("Direction",h,DirectionDampTime,Time.deltaTime); 前跑,左跑,右跑转换。
9.截图功能:if(Input.GetKey(KeyCode.P)&&Input.GetKey(KeyCode.LeftControl)){Application.captureScreenshot("Screenshot.png");}
10.五种坐标系。
c#中[DllImport("user32.dll")]
屏幕坐标和像素视口坐标Z值体现的是与摄像机中心距离的远近。
11.全屏。Screen.fullScreen = !Screen.fullScreen;
12.锁定鼠标。Screen.lockCursor = ture;
13.Switch to 800×600 windowed,切换到,,,,Screen.SetResolution(800,600,false),false代表非全屏。
14.var ScreenPos:Vector3 = camera.WorldToScreenPoint(cube.position);世界坐标转屏幕坐标。
15.var World:Vector3 = camera.ScreenToWorldPoint(Input.mousePosition);
16.var ViewportPos:Vector3 = camera.ScreenToViewportPoint(Input.mousePosition);
17.var World:Vector3 = camera.ViewportToWorldPoint(Vector3(0.5,0.5,0.4));
18.光线投射,从摄像机投到屏幕中心
var p1: Vector3 = new Vector3(-0.86,0.38,-2.05);
Instantiate(sp,p1,transform.rotation);
var ray: Ray = camera.ViewportPointToRay(Vector3(0.5,0.5,0));
var hit: RaycastHit;
//发射光线
if (Physics.Raycast(ray,hit)){
wz.text = "I am looking at"+hit.transform.name;}
else
wz,text = "I am looking at noting";
19.小岛游戏存档功能使得charge数组指针超出了范围,但是游戏里没有体现具体的异常。
UGUI&&Animator模块知识点随记的更多相关文章
- logging模块知识点及应用小结
Logging模块知识点: 一.分为5个级别:debug(),info(),warning(),error(),critical().级别由低到高 1.1最简单的用法: 1.2 如果想把日志写到文件 ...
- Elementui实战知识点随记
1. Elementui实战知识点随记 1.1. 表单验证 对于复杂数据,类似于对象里面包含数组,每个数组又包含多个对象,表单验证我查看了网上很多资料都说Elementui不支持,实际上,经过我官网的 ...
- 【13】python time时间模块知识点备查
表示时间的三种形式 # 时间模块 '''UTC(世界协调时间):格林尼治天文时间,世界标准时间,在中国来说是UTC+8DST(夏令时):是一种节约能源而人为规定时间制度,在夏季调快1个小时 时间的表示 ...
- unity3d 知识点随记
1.transform.translate是增加transform面板相应的数值x,y,z是以本地坐标系为方向:transform.transformdirection是以世界坐标系为方向,可以去测试 ...
- java 知识点随记
JAVA 读取配置文件: Properties props= new Properties();//文件在src目录下,编译会被加载到classpath下. Props.load(Test.class ...
- Halcon知识点随记(每日更新)
部分积累自重码网视频 1.dev_update_off.dev_update_on 一般dev_update_off放在开始,dev_update_on放在程序结束 dev_update_window ...
- unity3d API知识点随记
1.transform.translate是增加transform面板相应的数值x,y,z是以本地坐标系为方向:transform.transformdirection是以世界坐标系为方向,可以去测试 ...
- C语言若干知识点归记
一.C语言指针学习架构 1.基本数据类型---指针 2.字符串---指针 3.数组---指针 4.函数---指针 5.结构体---指针 6.共用体---指针 7.枚举---指针 8.位域---指针 9 ...
- python 函数,模块知识点运用示例
给定验证码长度n,生成随机验证码,验证码由数字.字母组成(参考chr()内置方法) # 给定验证码长度n,生成随机验证码,验证码由数字.字母组成(参考chr()内置方法) # 第33-126号(共94 ...
随机推荐
- win10开机自动启动小键盘
打开注册表 展开到HKEY_USERS\.DEFAULT\Control Panel\Keyboard 再选择InitialKeyboardIndicators, 将其数值数据修改为2(Win7)/8 ...
- IComparable<T> Vs. IComparer<T> System.Comparison<T>
Well they are not quite the same thing as IComparer<T> is implemented on a type that is capabl ...
- win7(64位)php5.5-Apache2.4-mysql5.6环境安装
原文链接http://jingyan.baidu.com/article/9faa723152c5d6473d28cb47.html 工具/原料 php-5.5.10-Win32-VC11-x64.z ...
- [DFNews] Touch ID不是神话,指模依旧能搞定。
扫描制作翻模,使用含石墨硅胶压膜,前者复制指纹纹路,后者欺骗活体检测.
- [转]Installing SharePoint 2013 on Windows Server 2012 R2
转自:http://www.avivroth.com/2013/07/09/installing-sharepoint-2013-on-windows-server-2012-r2-preview/ ...
- linux命令-cp/scp {拷贝}
一 命令解释 名称:cp 使用权限:所有使用者 使用方式: cp [options] source dest cp [options] source... directory 命令参数: -a 尽可能 ...
- 线程,yield让出cpu调度
public class Yield01 extends Thread { public static void main(String[] args) { new Yield01().start() ...
- iOS屏幕适配
## iOS屏幕适配 ### iOS屏幕适配发展史 1> iPhone4以前(没有iPad) * 不需要屏幕适配 2> iPad.iPhone5等设备出现 * 需要做横竖屏适配 * aut ...
- RestoreDirectory 引起的BUG
IIRC, in windows XP when you press Save on a SaveFileDialog (or Open on a OpenFileDialog) the direct ...
- 关于ckeditor ajax提交到后台 问题
ckeditor 提交时 如果有带有html时是提交不了的 解决办法就是 你在提交的时候 将ckeditor获取的只编码(encodeURI) 然后在传到后台提交的时候 在解码 就ok了 ckname ...