随笔分类 -  Unity

摘要:using System.Collections; using System.Collections.Generic; using UnityEngine; //思想:在短时间内在规定圆内随机震动对象位置,从而实现震动效果 public class CamZhengDong : MonoBehavi 阅读全文
posted @ 2018-11-22 16:48 新哲 阅读(1200) 评论(0) 推荐(0)
摘要:using System.Collections; using System.Collections.Generic; using UnityEngine; public class NewBehaviourScript : MonoBehaviour { //滚动速度 public float H 阅读全文
posted @ 2018-11-22 10:24 新哲 阅读(1822) 评论(0) 推荐(0)
摘要://射线原点 [SerializField] Transform tr; //射线长度 [SerializField] float dis = 5; //射线停留时间 [SerializField] float t=0.1f // Use this for initialization void S 阅读全文
posted @ 2018-11-11 00:04 新哲 阅读(242) 评论(0) 推荐(0)
摘要:Material mat; // float a=0; //控制闪烁速度 float speed=0.6f; float b=1; Update(){ if(a>0.3f){ b=1; } if(a<=0f){ b=-1; } a += Time.deltaTime * b *speed; mat. 阅读全文
posted @ 2018-11-09 20:00 新哲 阅读(1962) 评论(0) 推荐(0)
摘要:Animation:单一动画,一般使用在单一动画播放。占用资源小。 Animator:多个动画,可用控制器切换多个动画播放。占用资源大。 阅读全文
posted @ 2018-11-09 19:44 新哲 阅读(2479) 评论(0) 推荐(0)
摘要:Text tex; string s="Unity使Text 文字逐个出现"; //字符出现间隔 waitTime = 0.3f; // float speed=0; //方法一 //在协同中实现 IEnumertor IEnName(){ foreach(char c in s){ tex.tex 阅读全文
posted @ 2018-11-09 19:36 新哲 阅读(4286) 评论(0) 推荐(0)
摘要://需要创建对象 GameObject prefab; //创建对象的规定位置或父物体 Transform tr; //创建出对象 Instantiate(prefab); //创建对象,并设定位置和角度 Instantiate(prefab,tr.position,tr.rotation); // 阅读全文
posted @ 2018-11-09 19:17 新哲 阅读(9492) 评论(0) 推荐(0)
摘要:https://images2018.cnblogs.com/blog/1287763/201807/1287763-20180707184445513-576448143.png 阅读全文
posted @ 2018-07-07 19:04 新哲 阅读(4021) 评论(0) 推荐(0)