Esempio n. 1
0
    /*
     * ==============
     * === SETTER ===
     * ==============
     */

    public void setSetting(int name, bool value)
    {
        /*
         * replaces a variable's content
         * and load required methods after settings change
         */

        setValue(name, value);
        morphIndicator.loadMorphIndicators();

        // test if canMove was disabled, and if so, remove all velocity
        if (name == Player.CAN_MOVE && value == false)
        {
            rb2d.velocity      = Vector2.zero;
            doubleJumpMovement = Vector2.zero;
        }
    }