传送触发器 using System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEngine.SceneManagement; //玩家传送触发器及传送点public class StreetChanger : MonoBehaviour { public string sceneName;//传送的场景的名字 public float transTime;//传送等待的时间,比如在此时间内
对话类--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- using System.Collections.Ge
using UnityEngine; using System.Collections; public class Triangle : MonoBehaviour { public float speed = 90; // Update is called once per frame void Update () { transform.Rotate(Vector3.forward*Time.deltaTime*speed); } public void ChangeSpeed(float
残影特效在网上有很多例子,比如这个,我参考着自己整合了一下,算是整合了一个比较完整且特别简单易用的出来,只需要一个脚本挂上去无需任何设定就能用. 这里只针对SkinnedMeshRenderer的网格(也就是带蒙皮的网格)残影,主要原理是根据设定的间隔时间连续的截取当前SkinnedMeshRenderer的网格数据并使用Graphics.DrawMesh画出网格. 一.首先是我们的残影类,为了能及时的Destroy,所以它最好派生至Object: class AfterImage : Obje
Light Types 灯光类型 We have now covered some of the project settings which need to be considered before beginning work on lighting your scenes in Unity. Hopefully at this point you should have your project configured appropriately for your target plat