Exemple #1
0
    private void Tune()
    {
        JSONNodeReader jsonP = new JSONNodeReader(filePlayer);

        playerTongue.SetData(new PlayerTongue.Data(
                                 jsonP.Get("seconds of tongue", 0.2f),
                                 jsonP.Get("seconds of tongue cooldown", 1.0f)));
        AddTongueDamage(jsonP.Get("tongue damage", 10));
        AddHeadbuttDamage(jsonP.Get("headbutt damage", 20));
        gbao.SetAcceleration(jsonP.Get("horizontal acceleration", 40.0f));
        gban.SetGroundDeceleration(jsonP.Get("ground deceleration", 32.0f));
        gban.SetMaxHorizontalSpeed(jsonP.Get("max horizontal speed", 16.0f));
        gbj.SetJumpVelocity(jsonP.Get("jump velocity", 20.0f));
        gravity.SetAcceleration(jsonP.Get("gravity", 39.2f));
        InitializeHealth(jsonP.Get("health", 100));
    }
Exemple #2
0
    private void Tune()
    {
        JSONNodeReader jsonP = new JSONNodeReader(filePlayer);

        playerTongue.SetData(new NTFPlayerTongue.Data(
                                 jsonP.Get("seconds of tongue", 0.2f),
                                 jsonP.Get("seconds of tongue cooldown", 1.0f)));
        AddTongueDamage(jsonP.Get("tongue damage", 10));
        AddHeadbuttDamage(jsonP.Get("headbutt damage", 20));
        playerHeadbutt.SetRequiredHorizontalSpeed(
            jsonP.Get("headbutt required horizontal speed", 8.0f));
        gbar.SetAcceleration(jsonP.Get("horizontal acceleration", 40.0f));
        gban.SetGroundDeceleration(jsonP.Get("ground deceleration", 32.0f));
        gban.SetMaxHorizontalSpeed(jsonP.Get("max horizontal speed", 16.0f));
        gbj.SetJumpVelocity(jsonP.Get("jump velocity", 20.0f));
        gravity.SetAcceleration(jsonP.Get("gravity", 39.2f));
        InitializeHealth(jsonP.Get("health", 100));
        invincibilityFrames.SetSecondsTarget(jsonP.Get(
                                                 "seconds of invincibility when damaged", 1.0f));
        damagePerSecondOfContact.SetSeconds(1.0f);
    }