Exemplo n.º 1
0
    void WaterSurfaceEnter(object obj)
    {
        WaterSurface surface = obj as WaterSurface;

        if (IsHit)
        {
            Explode(true);
            surface.DoSplash(gameObject, transform.position);
        }
    }
Exemplo n.º 2
0
    void WaterSurfaceEnter(object obj)
    {
        var velocity = _rb.velocity;

        if (velocity.magnitude > 1f)
        {
            WaterSurface surface = obj as WaterSurface;
            surface.DoSplash(gameObject, transform.position);
        }
    }