Exemplo n.º 1
0
    void OnTriggerEnter(Collider other)
    {
        Destructible destructible = other.GetComponent <Destructible>();

        if (destructible != null)
        {
            destructible.takeDamage(damage);
            Destroy(gameObject);
            shake.Shake1();
            GameManager.Instance.Timer.DoBulletTime(0.01f, 2f);
        }
    }