Exemplo n.º 1
0
 public static Offset <SpriteBox> CreateSpriteBox(FlatBufferBuilder builder,
                                                  uint triggerTime_ms = 0,
                                                  StringOffset spriteBoxNameOffset    = default(StringOffset),
                                                  StringOffset layerOffset            = default(StringOffset),
                                                  StringOffset assetNameOffset        = default(StringOffset),
                                                  StringOffset renderMethodOffset     = default(StringOffset),
                                                  StringOffset spriteSeqEndTypeOffset = default(StringOffset),
                                                  float alpha = 100.0f,
                                                  int xPos    = 0,
                                                  int yPos    = 0,
                                                  uint width  = 0,
                                                  uint height = 0)
 {
     builder.StartObject(11);
     SpriteBox.AddHeight(builder, height);
     SpriteBox.AddWidth(builder, width);
     SpriteBox.AddYPos(builder, yPos);
     SpriteBox.AddXPos(builder, xPos);
     SpriteBox.AddAlpha(builder, alpha);
     SpriteBox.AddSpriteSeqEndType(builder, spriteSeqEndTypeOffset);
     SpriteBox.AddRenderMethod(builder, renderMethodOffset);
     SpriteBox.AddAssetName(builder, assetNameOffset);
     SpriteBox.AddLayer(builder, layerOffset);
     SpriteBox.AddSpriteBoxName(builder, spriteBoxNameOffset);
     SpriteBox.AddTriggerTimeMs(builder, triggerTime_ms);
     return(SpriteBox.EndSpriteBox(builder));
 }
Exemplo n.º 2
0
 public static SpriteBox GetRootAsSpriteBox(ByteBuffer _bb, SpriteBox obj)
 {
     return(obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb));
 }