Ejemplo n.º 1
0
        public static Offset <global::FB_WebProtocol2.Weapon> Encode(Game_WebProtocol.FB_WebProtocol2.Weapon source, FlatBufferBuilder fbb)
        {
            StringOffset nameOffset = fbb.CreateString(source.name);

            global::FB_WebProtocol2.Weapon.StartWeapon(fbb);
            global::FB_WebProtocol2.Weapon.AddId(fbb, source.id);
            global::FB_WebProtocol2.Weapon.AddName(fbb, nameOffset);
            global::FB_WebProtocol2.Weapon.AddAmmoCapacity(fbb, source.ammo_capacity);
            return(global::FB_WebProtocol2.Weapon.EndWeapon(fbb));
        }
Ejemplo n.º 2
0
 public static void Decode(Game_WebProtocol.FB_WebProtocol2.Weapon destination, global::FB_WebProtocol2.Weapon source)
 {
     destination.id            = source.Id;
     destination.name          = source.Name;
     destination.ammo_capacity = source.AmmoCapacity;
 }