private void OnCollisionEnter(Collision other) { if (other.collider.CompareTag(CTag.TAG_PLAYER)) { TrackCreater.SetPlayerIndex(GetIndex()); TrackCreater.UpdateTrack(GetIndex()); } }
private IEnumerator SeqTrack() { while (PlayerPosition < TrackCreater.TrackList.Count) { TrackCreater.UpdateTrack(PlayerPosition); yield return(new WaitForSeconds(0.5f)); //yield return null; PlayerPosition++; if (TrackCreater.TrackList.Count == PlayerPosition) { PlayerPosition = 0; } } }