Ejemplo n.º 1
0
            public static Improbable.Gdk.Tests.ExhaustiveBlittableSingular.Component Deserialize(global::Improbable.Worker.Core.SchemaObject obj, global::Unity.Entities.World world)
            {
                var component = new Improbable.Gdk.Tests.ExhaustiveBlittableSingular.Component();

                {
                    component.Field1 = obj.GetBool(1);
                }
                {
                    component.Field2 = obj.GetFloat(2);
                }
                {
                    component.Field4 = obj.GetInt32(4);
                }
                {
                    component.Field5 = obj.GetInt64(5);
                }
                {
                    component.Field6 = obj.GetDouble(6);
                }
                {
                    component.Field8 = obj.GetUint32(8);
                }
                {
                    component.Field9 = obj.GetUint64(9);
                }
                {
                    component.Field10 = obj.GetSint32(10);
                }
                {
                    component.Field11 = obj.GetSint64(11);
                }
                {
                    component.Field12 = obj.GetFixed32(12);
                }
                {
                    component.Field13 = obj.GetFixed64(13);
                }
                {
                    component.Field14 = obj.GetSfixed32(14);
                }
                {
                    component.Field15 = obj.GetSfixed64(15);
                }
                {
                    component.Field16 = obj.GetEntityId(16);
                }
                {
                    component.Field17 = global::Improbable.Gdk.Tests.SomeType.Serialization.Deserialize(obj.GetObject(17));
                }
                return(component);
            }
Ejemplo n.º 2
0
            public static void ApplyUpdate(global::Improbable.Worker.Core.SchemaComponentUpdate updateObj, ref Improbable.Gdk.Tests.ExhaustiveBlittableSingular.Component component)
            {
                var obj = updateObj.GetFields();

                {
                    if (obj.GetBoolCount(1) == 1)
                    {
                        var value = obj.GetBool(1);
                        component.Field1 = value;
                    }
                }
                {
                    if (obj.GetFloatCount(2) == 1)
                    {
                        var value = obj.GetFloat(2);
                        component.Field2 = value;
                    }
                }
                {
                    if (obj.GetInt32Count(4) == 1)
                    {
                        var value = obj.GetInt32(4);
                        component.Field4 = value;
                    }
                }
                {
                    if (obj.GetInt64Count(5) == 1)
                    {
                        var value = obj.GetInt64(5);
                        component.Field5 = value;
                    }
                }
                {
                    if (obj.GetDoubleCount(6) == 1)
                    {
                        var value = obj.GetDouble(6);
                        component.Field6 = value;
                    }
                }
                {
                    if (obj.GetUint32Count(8) == 1)
                    {
                        var value = obj.GetUint32(8);
                        component.Field8 = value;
                    }
                }
                {
                    if (obj.GetUint64Count(9) == 1)
                    {
                        var value = obj.GetUint64(9);
                        component.Field9 = value;
                    }
                }
                {
                    if (obj.GetSint32Count(10) == 1)
                    {
                        var value = obj.GetSint32(10);
                        component.Field10 = value;
                    }
                }
                {
                    if (obj.GetSint64Count(11) == 1)
                    {
                        var value = obj.GetSint64(11);
                        component.Field11 = value;
                    }
                }
                {
                    if (obj.GetFixed32Count(12) == 1)
                    {
                        var value = obj.GetFixed32(12);
                        component.Field12 = value;
                    }
                }
                {
                    if (obj.GetFixed64Count(13) == 1)
                    {
                        var value = obj.GetFixed64(13);
                        component.Field13 = value;
                    }
                }
                {
                    if (obj.GetSfixed32Count(14) == 1)
                    {
                        var value = obj.GetSfixed32(14);
                        component.Field14 = value;
                    }
                }
                {
                    if (obj.GetSfixed64Count(15) == 1)
                    {
                        var value = obj.GetSfixed64(15);
                        component.Field15 = value;
                    }
                }
                {
                    if (obj.GetEntityIdCount(16) == 1)
                    {
                        var value = obj.GetEntityId(16);
                        component.Field16 = value;
                    }
                }
                {
                    if (obj.GetObjectCount(17) == 1)
                    {
                        var value = global::Improbable.Gdk.Tests.SomeType.Serialization.Deserialize(obj.GetObject(17));
                        component.Field17 = value;
                    }
                }
            }
Ejemplo n.º 3
0
 public static void SerializeUpdate(Improbable.Gdk.Tests.ExhaustiveBlittableSingular.Component component, global::Improbable.Worker.Core.SchemaComponentUpdate updateObj)
 {
     var obj = updateObj.GetFields();
     {
         if (component.IsDataDirty(0))
         {
             obj.AddBool(1, component.Field1);
         }
     }
     {
         if (component.IsDataDirty(1))
         {
             obj.AddFloat(2, component.Field2);
         }
     }
     {
         if (component.IsDataDirty(2))
         {
             obj.AddInt32(4, component.Field4);
         }
     }
     {
         if (component.IsDataDirty(3))
         {
             obj.AddInt64(5, component.Field5);
         }
     }
     {
         if (component.IsDataDirty(4))
         {
             obj.AddDouble(6, component.Field6);
         }
     }
     {
         if (component.IsDataDirty(5))
         {
             obj.AddUint32(8, component.Field8);
         }
     }
     {
         if (component.IsDataDirty(6))
         {
             obj.AddUint64(9, component.Field9);
         }
     }
     {
         if (component.IsDataDirty(7))
         {
             obj.AddSint32(10, component.Field10);
         }
     }
     {
         if (component.IsDataDirty(8))
         {
             obj.AddSint64(11, component.Field11);
         }
     }
     {
         if (component.IsDataDirty(9))
         {
             obj.AddFixed32(12, component.Field12);
         }
     }
     {
         if (component.IsDataDirty(10))
         {
             obj.AddFixed64(13, component.Field13);
         }
     }
     {
         if (component.IsDataDirty(11))
         {
             obj.AddSfixed32(14, component.Field14);
         }
     }
     {
         if (component.IsDataDirty(12))
         {
             obj.AddSfixed64(15, component.Field15);
         }
     }
     {
         if (component.IsDataDirty(13))
         {
             obj.AddEntityId(16, component.Field16);
         }
     }
     {
         if (component.IsDataDirty(14))
         {
             global::Improbable.Gdk.Tests.SomeType.Serialization.Serialize(component.Field17, obj.AddObject(17));
         }
     }
 }