Esempio n. 1
0
    // WIP / broken:
    // private Vector2 slimeSoccerUp = new Vector2(0, 10);
    // private Vector2 slimeSoccerDown = new Vector2(0, -10);
    // Return to normal.
    public void StopRandomEvent()
    {
        Debug.Log("stoprandomevent");
        // Apply normal gravity.
        m_ballManager.AntiGravBalls();

        if(m_gravity == m_strongLeft)
        {
            gravEffectLeft.GetComponent<GravityEffectController>().EffectOff ();
            Debug.Log ("Turning off");
        }
        else
        {
            gravEffectRight.GetComponent<GravityEffectController>().EffectOff ();
        }

        Physics2D.gravity = new Vector2(0f, 0f);
        m_gravitySound.FadeOut();
        m_running = false;
    }