Example #1
0
 public static void loadStats(statsToSave savedStats, Stats stats)
 {
     stats.Damage = savedStats.Damage;
     stats.damageResistanceInPercent = savedStats.damageResistanceInPercent;
     stats.manna = savedStats.manna;
     stats.MannaEarnPerSecond = savedStats.MannaEarnPerSecond;
     stats.MaxHealth          = savedStats.MaxHealth;
     stats.MaxManna           = savedStats.MaxManna;
     stats.Speed             = savedStats.Speed;
     stats.health            = savedStats.health;
     stats.AmmoCountUpdate   = savedStats.AmmoCountUpdate;
     stats.DamageCountUpdate = savedStats.DamageCountUpdate;
     stats.damageResistanceInPercentCountUpdate = savedStats.damageResistanceInPercentCountUpdate;
     stats.HealthCountUpdate   = savedStats.HealthCountUpdate;
     stats.MedChestCountUpdate = savedStats.MedChestCountUpdate;
     stats.SpeedCountUpdate    = savedStats.SpeedCountUpdate;
 }
Example #2
0
    public static statsToSave CreateStructStats(Stats stats)
    {
        statsToSave statsToSave = new statsToSave();

        statsToSave.Damage = stats.Damage;
        statsToSave.damageResistanceInPercent = stats.damageResistanceInPercent;
        statsToSave.manna = stats.manna;
        statsToSave.MannaEarnPerSecond = stats.MannaEarnPerSecond;
        statsToSave.MaxHealth          = stats.MaxHealth;
        statsToSave.MaxManna           = stats.MaxManna;
        statsToSave.Speed             = stats.Speed;
        statsToSave.health            = stats.health;
        statsToSave.AmmoCountUpdate   = stats.AmmoCountUpdate;
        statsToSave.DamageCountUpdate = stats.DamageCountUpdate;
        statsToSave.damageResistanceInPercentCountUpdate = stats.damageResistanceInPercentCountUpdate;
        statsToSave.HealthCountUpdate   = stats.HealthCountUpdate;
        statsToSave.MedChestCountUpdate = stats.MedChestCountUpdate;
        statsToSave.SpeedCountUpdate    = stats.SpeedCountUpdate;

        return(statsToSave);
    }
Example #3
0
    public static statsToSave GetStats(PlayerType playerType)
    {
        statsToSave stats = new statsToSave();

        if (playerType == PlayerType.Egor)
        {
            stats = SaveController.saves[OneSavePanel.SaveNum].statsEgor;
        }
        else if (playerType == PlayerType.Dimitry)
        {
            stats = SaveController.saves[OneSavePanel.SaveNum].statsDima;
        }
        else if (playerType == PlayerType.Maxim)
        {
            stats = SaveController.saves[OneSavePanel.SaveNum].statsMax;
        }
        else if (playerType == PlayerType.Alex)
        {
            stats = SaveController.saves[OneSavePanel.SaveNum].statsAlex;
        }
        return(stats);
    }