示例#1
0
    void OnTriggerEnter(Collider collider)
    {
        if (!isDead && deathCountdown < 0f)
        {
            isDead = true;
            avatar.EmittBurst();
            //burst.Play();

            if (collider.transform.parent.parent.GetComponent <PipeItem>().type == PipeItem.OType.Egg)
            {
                AudioController.Instace.PlaySoundEffect();
                deathCountdown = 0f;
            }
            else
            {
                deathCountdown = 3f;
            }

            physicsVelocity = body.velocity;
            savedVelocity   = velocity;
        }
    }