Example #1
0
 public Data(PlayerPunch.Data punchData,
             PlayerPowerup.Data powerupData,
             PlayerInput.Data inputData,
             PlayerHealth.Data healthData,
             PlayerDeathTracker.Data deathTrackerData)
 {
     this.punchData        = punchData;
     this.powerupData      = powerupData;
     this.inputData        = inputData;
     this.healthData       = healthData;
     this.deathTrackerData = deathTrackerData;
 }
Example #2
0
    private void Tune()
    {
        JSONNodeReader jsonP = new JSONNodeReader(playerFile);
        JSONNodeReader jsonI = new JSONNodeReader(itemFile);

        PlayerPunch.Data punchData = new PlayerPunch.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));
        PlayerPowerup.Data powerupData = new PlayerPowerup.Data(
            jsonI.Get("seconds of battle axe", 8.0f),
            jsonI.Get("seconds of more arms", 8.0f));
        PlayerInput.Data inputData = new PlayerInput.Data(
            jsonP.Get("base movement speed", 10.0f));
        PlayerHealth.Data healthData = new PlayerHealth.Data(
            jsonP.Get("seconds of invincibility when damaged", 1.0f),
            jsonP.Get("chance of saying f**k", 0.01f),
            jsonP.Get("max health", 100));
        PlayerDeathTracker.Data deathData = new PlayerDeathTracker.Data(
            jsonP.Get("seconds to wait after dying", 5.0f));
        SetData(new Data(punchData, powerupData, inputData, healthData, deathData));
    }