Ejemplo n.º 1
0
 void followTail()
 {
     if (tail.Count > 0)
     {
         if (playerMovement.pointsHistory.Count > 2)
         {
             tail[0].transform.position = playerMovement.pointsHistory[playerMovement.pointsHistory.Count - 2];
         }
     }
     for (int i = 1; i < tail.Count; i++)
     {
         tail[i].transform.position = playerMovement.pointsHistory[playerMovement.pointsHistory.Count - (2 + i)];
     }
     if (tail.Count > PlayerPrefs.GetInt("Longest_Tail"))
     {
         PlayerPrefs.SetInt("Longest_Tail", tail.Count);
         ach.AchEighteen(tail.Count);
         ach.AchNineteen(tail.Count);
         ach.AchTwenty(tail.Count);
         ach.AchTwentyOne(tail.Count);
     }
 }