private void Update() { //Stop all sequences is ActionSequenceSystem if (Input.GetKeyDown(KeyCode.End)) { ActionSequenceSystem.StopAll(); } }
// Update is called once per frame private void Update() { //Start a loop in Update, using transform as ID if (Input.GetKeyDown(KeyCode.A)) { transform.Looper(1, -1, true, count => Debug.Log("A" + count)); } //Start a loop in Update if (Input.GetKeyDown(KeyCode.S)) { this.Looper(1, -1, true, count => Debug.Log("S" + count)); } if (Input.GetKeyDown(KeyCode.C)) { this.Sequence().Interval(1).Action(() => this.Sequence().Interval(1).Action(() => Debug.Log("C"))) .Interval(2) .Action(i => Debug.Log(i)); } //Stop all sequences start by this ID if (Input.GetKeyDown(KeyCode.D)) { transform.StopSequence(); } //Stop all sequences start by transform if (Input.GetKeyDown(KeyCode.F)) { this.StopSequence(); } //Stop all sequences is ActionSequenceSystem if (Input.GetKeyDown(KeyCode.End)) { Debug.Log("手动停止所有序列"); ActionSequenceSystem.StopAll(); } //If this Component is destroyed, the associated Sequence will automatically stop and recycle to the pool. }