Beispiel #1
0
    void GetCollected()
    {
        int stackPos = squirrel.GetAcorn(this);

        if (stackPos > -1)
        {
            sounds[SOUND_COLLECT].Play();
            state                   = ST_COLLECTED;
            rend.sprite             = sprites[1];
            scaleModifier           = 1;
            transform.parent        = squirrel.transform;
            transform.localScale    = baseScale;
            transform.rotation      = Quaternion.identity;
            transform.localPosition = new Vector3(0, 2.5f + (3 * stackPos), -0.1f * stackPos);
            wobbleRange             = 0.4f * stackPos;
        }
    }