Ejemplo n.º 1
0
    public void ApplyLoadedData(object data)
    {
        var d = data as DSPlayerSquad;

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

        firstConsumable.ApplyLoadedData(d.firstConsumable);
        secondConsumable.ApplyLoadedData(d.secondConsumable);

        inventory = d.inventory;


        count  = d.count;
        health = d.health;

        helmetStack = new EquipmentStack(d.Helmet);
        bodyStack   = new EquipmentStack(d.Body);
        shieldStack = new EquipmentStack(d.Shield);
        weaponStack = new EquipmentStack(d.Weapon);

        isEmpty = d.isEmpty;

        //призагрузке надо пройтись по спрайтам и обновить. так как они сериальзуются по id а не по содержимому
        ResetIcons();
    }
Ejemplo n.º 2
0
 public PlayerProgress()
 {
     Flags     = new DSFlags();
     Score     = new DSPlayerScore();
     Stats     = new DSUnitStats();
     Skills    = new DSPlayerSkills();
     Equipment = new DSPlayerEquipment();
     Squad     = new DSPlayerSquad();
     Level     = new LevelInfo();
 }