private IEnumerator IEAdd(TimePoint <Vector3> result) { yield return(IeDelay); recordCache.Add(result); yield break; }
private void RecordPoint() { if (time >= interval) { time = 0; if (recordCache.Count > 0 && recordCache[recordCache.Count - 1].data == target.position) { return; } var result = new TimePoint <Vector3>(Time.realtimeSinceStartup + delay, lifeTime, target.position); StartCoroutine(IEAdd(result)); } }