mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-19 21:55:43 +00:00
Initial commit of the FlatBuffers code.
Change-Id: I4c9f0f722490b374257adb3fec63e44ae93da920 Tested: using VS2010 / Xcode / gcc on Linux.
This commit is contained in:
25
samples/monster.fbs
Executable file
25
samples/monster.fbs
Executable file
@@ -0,0 +1,25 @@
|
||||
// example IDL file
|
||||
|
||||
namespace MyGame.Sample;
|
||||
|
||||
enum Color:byte { Red = 0, Green, Blue = 2 }
|
||||
|
||||
union Any { Monster } // add more elements..
|
||||
|
||||
struct Vec3 {
|
||||
x:float;
|
||||
y:float;
|
||||
z:float;
|
||||
}
|
||||
|
||||
table Monster {
|
||||
pos:Vec3;
|
||||
mana:short = 150;
|
||||
hp:short = 100;
|
||||
name:string;
|
||||
friendly:bool = false (deprecated);
|
||||
inventory:[ubyte];
|
||||
color:Color = Blue;
|
||||
}
|
||||
|
||||
root_type Monster;
|
||||
Reference in New Issue
Block a user