Пример #1
0
    public void ApplyLoadedData(object data)
    {
        Debug.Log("------------PlayerProgress loaded data applying...");

        var d = data as PlayerProgress;

        if (d == null)
        {
            d = new PlayerProgress();
        }

        Flags = d.Flags;
        Score.ApplyLoadedData(d.Score);

        Stats = d.Stats;
        //if some gamers olready have some saved data
        //we need to repair it to new stats range
        Stats.RepairMaxMinRanges();

        Skills.ApplyLoadedData(d.Skills);
        Equipment = d.Equipment;
        Squad.ApplyLoadedData(d.Squad);
        Level = d.Level;

        Debug.Log("------------PlayerProgress loaded data was applyed");
    }