Exemplo n.º 1
0
        public void SaveLocally()
        {
            FileStream   FS = new FileStream("User data/Profiles/Battle Map/" + Name + ".bin", FileMode.OpenOrCreate, FileAccess.Write);
            BinaryWriter BW = new BinaryWriter(FS, Encoding.UTF8);

            BW.Write(GameplayType.ToString());
            BW.Write(Money);

            Inventory.Save(BW);

            BW.Close();
            FS.Close();
        }
Exemplo n.º 2
0
        public void SaveLocally()
        {
            FileStream   FS = new FileStream("Triple Thunder Save File.bin", FileMode.OpenOrCreate, FileAccess.Write);
            BinaryWriter BW = new BinaryWriter(FS, Encoding.UTF8);

            BW.Write(Name);
            BW.Write(GameplayType.ToString());
            BW.Write(Money);

            Equipment.SaveLocally(BW);

            BW.Close();
            FS.Close();
        }
Exemplo n.º 3
0
        public void SaveLocally()
        {
            FileStream   FS = new FileStream("Triple Thunder Save File.bin", FileMode.OpenOrCreate, FileAccess.Write);
            BinaryWriter BW = new BinaryWriter(FS, Encoding.UTF8);

            BW.Write(Name);
            BW.Write(GameplayType.ToString());
            BW.Write(Money);

            BW.Write(Equipment.ListCharacter.Count);
            foreach (CharacterMenuEquipment ActiveCharacter in Equipment.ListCharacter)
            {
                BW.Write(ActiveCharacter.Name);
            }

            BW.Write(Equipment.ListEquipment.Count);
            foreach (MenuEquipment ActiveEquipment in Equipment.ListEquipment)
            {
                BW.Write(ActiveEquipment.Name);
            }

            BW.Write(Equipment.ListItem.Count);
            foreach (MenuEquipment ActiveEquipment in Equipment.ListItem)
            {
                BW.Write(ActiveEquipment.Name);
            }

            BW.Write(Equipment.ListWeapon.Count);
            foreach (MenuEquipment ActiveEquipment in Equipment.ListWeapon)
            {
                BW.Write(ActiveEquipment.Name);
            }

            BW.Write(Equipment.CharacterType);
            BW.Write(Equipment.GrenadeType);
            BW.Write(Equipment.ExtraWeaponType);

            if (Equipment.EquipedEtc == null)
            {
                BW.Write("");
            }
            else
            {
                BW.Write(Equipment.EquipedEtc.Name);
            }

            if (Equipment.EquipedHead == null)
            {
                BW.Write("");
            }
            else
            {
                BW.Write(Equipment.EquipedHead.Name);
            }

            if (Equipment.EquipedArmor == null)
            {
                BW.Write("");
            }
            else
            {
                BW.Write(Equipment.EquipedArmor.Name);
            }

            if (Equipment.EquipedWeaponOption == null)
            {
                BW.Write("");
            }
            else
            {
                BW.Write(Equipment.EquipedWeaponOption.Name);
            }

            if (Equipment.EquipedBooster == null)
            {
                BW.Write("");
            }
            else
            {
                BW.Write(Equipment.EquipedBooster.Name);
            }

            if (Equipment.EquipedShoes == null)
            {
                BW.Write("");
            }
            else
            {
                BW.Write(Equipment.EquipedShoes.Name);
            }

            BW.Close();
            FS.Close();
        }