예제 #1
0
    public void HitStorm(Puck puck)
    {
        SphereSurfaceSlider otherSlider = puck.GetComponent <SphereSurfaceSlider>();

        if (otherSlider && puck)
        {
            otherSlider.HitByStormWithSphericalVelocity(0.5f * slider.sphericalVelocity);
            GameObject.Destroy(gameObject);
        }
    }
예제 #2
0
    void OnCollisionEnter(Collision collision)
    {
        Puck puck = collision.collider.GetComponent <Puck>();
        SphereSurfaceSlider otherSlider = collision.collider.GetComponent <SphereSurfaceSlider>();

        if (otherSlider && puck)
        {
            otherSlider.HitByStormWithSphericalVelocity(slider.sphericalVelocity);
            GameObject.Destroy(gameObject);
        }
    }