// Example IDL file for our monster's schema.

namespace MyGame.Sample;

enum Color:byte <beginfold id='1'>{</beginfold id='1'> Red = 0, Green, Blue = 2 <endfold id='1'>}</endfold id='1'>

union Equipment <beginfold id='1'>{</beginfold id='1'> Weapon <endfold id='1'>}</endfold id='1'> // Optionally add more tables.

struct Vec3 <beginfold id='1'>{</beginfold id='1'>
  x:float;
  y:float;
  z:float;
<endfold id='1'>}</endfold id='1'>

table Monster <beginfold id='1'>{</beginfold id='1'>
  pos:Vec3; // Struct.
  mana:short = 150;
  hp:short = 100;
  name:string;
  friendly:bool = false (deprecated);
  inventory:[ubyte];  // Vector of scalars.
  color:Color = Blue; // Enum.
  weapons:[Weapon];   // Vector of tables.
  equipped:Equipment; // Union.
  path:[Vec3];        // Vector of structs.
<endfold id='1'>}</endfold id='1'>

table Weapon <beginfold id='1'>{</beginfold id='1'>
  name:string;
  damage:short;
<endfold id='1'>}</endfold id='1'>

root_type Monster;
