Esempio n. 1
0
    void Start()
    {
        prevPosition = transform.position;
        if (bodyFollowed != null)
            bodyFollowed.bodyFollower = this;

        levelManager = GameObject.Find("LevelManager").GetComponent<LevelManager>();

        if (getIsPlayer())
        {
            levelManager.OnPlayerTailLenghtChanged(this.countTailLength());

            // change color of tails.
            if (isHead())
                this.setTailColor(levelManager.playerTailColor);
        }
    }