Beispiel #1
0
 public Data(RPPlayerPunch.Data punchData,
             RPPlayerPowerup.Data powerupData,
             RPPlayerInput.Data inputData,
             RPPlayerHealth.Data healthData,
             RPPlayerDeathTracker.Data deathTrackerData)
 {
     this.punchData        = punchData;
     this.powerupData      = powerupData;
     this.inputData        = inputData;
     this.healthData       = healthData;
     this.deathTrackerData = deathTrackerData;
 }
Beispiel #2
0
    private void Tune()
    {
        JSONNodeReader jsonP = new JSONNodeReader(playerFile);
        JSONNodeReader jsonI = new JSONNodeReader(itemFile);

        RPPlayerPunch.Data punchData = new RPPlayerPunch.Data(
            jsonP.Get("seconds of punching", 1.0f),
            jsonP.Get("seconds of punch cooldown", 1.0f),
            jsonI.Get("seconds of more arms punch cooldown", 0.1f),
            jsonP.Get("base punch hitbox size", 1.4f),
            jsonI.Get("battle axe hitbox size", 2.0f));
        RPPlayerPowerup.Data powerupData = new RPPlayerPowerup.Data(
            jsonI.Get("seconds of battle axe", 8.0f),
            jsonI.Get("seconds of more arms", 8.0f));
        RPPlayerInput.Data inputData = new RPPlayerInput.Data(
            jsonP.Get("base movement speed", 10.0f));
        RPPlayerHealth.Data healthData = new RPPlayerHealth.Data(
            jsonP.Get("seconds of invincibility when damaged", 1.0f),
            jsonP.Get("chance of saying f**k", 0.01f),
            jsonP.Get("max health", 100));
        RPPlayerDeathTracker.Data deathData = new RPPlayerDeathTracker.Data(
            jsonP.Get("seconds to wait after dying", 5.0f));
        SetData(new Data(punchData, powerupData, inputData, healthData, deathData));
    }