Example #1
0
    public void AddBody()
    {
        BodyMovement nextBodyPart = Instantiate(bodyPrototype);

        if (body.Count > 0)
        {
            nextBodyPart.Init(body[body.Count - 1]);
        }
        else
        {
            nextBodyPart.Init(transform);
        }
        nextBodyPart.gameObject.SetActive(true);
        body.Add(
            nextBodyPart.transform
            );
    }