public static void SetItemSlots(Character character, ItemSlots slots)
 {
     GmSerializer serializer = new GmSerializer();
     MemoryStream stream = new MemoryStream();
     serializer.Serialize(stream, slots);
     character.itemSlotData = System.Convert.ToBase64String(stream.ToArray());
 }
Exemple #2
0
        private byte[] Serialize(ClientMessage message)
        {
            MemoryStream stream = new MemoryStream();

            serializer.Serialize(stream, message);
            //Serializer.Serialize (stream, message);
            return(stream.ToArray());
        }
Exemple #3
0
        public static void SetItemSlots(Character character, ItemSlots slots)
        {
            GmSerializer serializer = new GmSerializer();
            MemoryStream stream     = new MemoryStream();

            serializer.Serialize(stream, slots);
            character.itemSlotData = System.Convert.ToBase64String(stream.ToArray());
        }
Exemple #4
0
        private static void Save(Characters characters)
        {
            MemoryStream stream     = new MemoryStream();
            GmSerializer serializer = new GmSerializer();

            serializer.Serialize(stream, characters);
            PlayerPrefs.SetString("npcs", Convert.ToBase64String(stream.ToArray()));
            Debug.Log(characters.characters.Count + " npc characters saved");
        }
 private static void Save(Characters characters)
 {
     MemoryStream stream = new MemoryStream();
     GmSerializer serializer = new GmSerializer();
     serializer.Serialize(stream, characters);
     PlayerPrefs.SetString("npcs", Convert.ToBase64String(stream.ToArray()));
     Debug.Log(characters.characters.Count + " npc characters saved");
 }