blob: af224512ee7245096c091681d18b02fb3860f2ae [file] [log] [blame]
Austin Schuhe89fa2d2019-08-14 20:24:23 -07001// Example IDL file for our monster's schema.
2
3namespace MyGame.Sample;
4
5enum Color:byte { Red = 0, Green, Blue = 2 }
6
7union Equipment { Weapon } // Optionally add more tables.
8
9struct Vec3 {
10 x:float;
11 y:float;
12 z:float;
13}
14
15table Monster {
16 pos:Vec3;
17 mana:short = 150;
18 hp:short = 100;
19 name:string;
20 friendly:bool = false (deprecated);
21 inventory:[ubyte];
22 color:Color = Blue;
23 weapons:[Weapon];
24 equipped:Equipment;
25 path:[Vec3];
26}
27
28table Weapon {
29 name:string;
30 damage:short;
31}
32
33root_type Monster;