Beispiel #1
0
    public void ChoosePlayer()
    {
        playerindex = Random.Range(0, playerCollection.Count);
        GameObject player = Instantiate(playerCollection[playerindex].playerHead, transform, false);
        GameObject head   = player.transform.GetChild(0).gameObject;

        AddCollider(playerCollection[playerindex].headcolliderType, head);
        FollowStart followStart = player.GetComponentInChildren <FollowStart>();

        followStart.tail = playerCollection[playerindex].playerTail;
        followStart.CreateTail();
    }
Beispiel #2
0
 private void Awake()
 {
     instance = this;
 }