Пример #1
0
  public void restoreFromBundle(Bundle bundle) {

    backpack.clear();
    backpack.restoreFromBundle(bundle);

    weapon = (KindOfWeapon) bundle.get(WEAPON);
    if (weapon != null) {
      weapon.activate(owner);
    }

    armor = (Armor) bundle.get(ARMOR);

    misc1 = (KindofMisc) bundle.get(MISC1);
    if (misc1 != null) {
      misc1.activate(owner);
    }

    misc2 = (KindofMisc) bundle.get(MISC2);
    if (misc2 != null) {
      misc2.activate(owner);
    }
  }