public void AddFollower(Follower theFollower) { followerCount++; theFollower.numberInLine = followerCount; tail = theFollower.transform; if (follower) { follower.AddFollower(theFollower); } else { follower = theFollower; follower.InitializeSteps(transform.position); } }
public void AddFollower(Follower theFollower) { if (nextInLine) { nextInLine.AddFollower(theFollower); } else { nextInLine = theFollower; nextInLine.InitializeSteps(transform.position); } }