Пример #1
0
    void OnTriggerEnter2D(Collider2D collision)
    {
        Bolt projectile = collision.GetComponent <Bolt>();

        if (projectile != null)
        {
            if (!locked)
            {
                // signal projectile to destroy itself
                projectile.Hit();

                SwitchAngle();
            }
        }
    }