Example #1
0
 private void OnCollisionEnter(Collision other)
 {
     if (other.collider.CompareTag(CTag.TAG_PLAYER))
     {
         TrackCreater.SetPlayerIndex(GetIndex());
         TrackCreater.UpdateTrack(GetIndex());
     }
 }
Example #2
0
    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;
            }
        }
    }