unity学习笔记7

来源:互联网 发布:桌秀美化软件下载 编辑:程序博客网 时间:2024/06/06 07:10

1.canvas属性相当于画布,供后期ui组件添加至上面(相对位置)
2.添加canvas group可以使得ui组件拥有透明度以及具有交互性
3.后期组件位置由rect属性中的左下方调节,宽度大小由width,height调节,posx和y调节相对锚点位置
4.unity渲染顺序是从所有子对象按顺序从上到下
5.public static Color Lerp(Color a, Color b, float t);
Linearly interpolates between colors a and b by t.
t is clamped between 0 and 1. When t is 0 returns a. When t is 1 returns b.就是已线性速度t,从颜色a变化到颜色b为止
6.Color.clear
public static Color clear;
Description
Completely transparent. RGBA is (0, 0, 0, 0)
完全变化颜色到无色透明
7.audio.play()在代码中控制音效播放
8.anim.setxxx()就是改变动作状态机的转换条件
9.movement.enabled=false表示对象停止位移
10.public void Translate(Vector3 translation, Space relativeTo = Space.Self);
Moves the transform in the direction and distance of translation
向指定的translation方向移动
11.particle.play触发粒子效果
12. GetComponent ().enabled = false;在结束追寻后使得目标停止追寻
13. 模型animation下的某一状态中的event事件可以添加触发public函数,在某一帧触发
14. line render用于模拟线性事物,例如激光
15. 某某组件可用与否使用enabled属性
16.
Physics.Raycast (shootRay射线, out shootHit返回击中点, range射线距离, shootableMask击中的层)
17.animate override controler用于使用相同的状态转化,but不同的动作实现
18.transform用于保存位置,旋转属性
19.可用通过inspector下方的seticon设置标记
20.选中游戏对象-》window的animation-》add curve创建关键动作-》选中属性-》拖动关键帧-》结束动作录制

0 0
原创粉丝点击