代码事件监听 using UnityEngine; using System.Collections; public class BoxEventScript : MonoBehaviour { void Start () { AnimationClip gunMove = animation.GetClip("left");//动画名 AnimationEvent aevent = new AnimationEvent(); aeve…
暂停是游戏中经常出现的功能,而Unity3D中对于暂停的处理并不是很理想.一般的做法是将Time.timeScale设置为0.Unity的文档中对于这种情况有以下描述: The scale at which the time is passing. This can be used for slow motion effects….When timeScale is set to zero the game is basically paused … timeScale表示游戏中时间流逝快慢的尺…