12 2018 档案
摘要:在unity中运行某段程序时往往需要运行另外一段不相干但是却对功能上有需求的程序,比如进行场景传送,在传送点处,点击I键,屏幕慢慢变黑,场景传送到另外一个场景,场景又慢慢变亮。这里首先涉及两个物体,一个是传送触发器物体,点击I键,过一段时间后进行场景传送,另外一个就是遮罩物体,这里使用UGUI中的P
阅读全文
摘要:由于插值是 l=a*t+b(1-t),因此使用下面的这段代码 spriteRenderer.color = Color.Lerp (color01, color02, lerV); 只要使得lerV(即t)在0到1之间来回变换,即可使得颜色在两个颜色之间来回变换 public class Coin
阅读全文
摘要:首先见官方文档 In most cases you should not modify the velocity directly, as this can result in unrealistic behaviour. Don't set the velocity of an object ev
阅读全文