You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
518 B
34 lines
518 B
4 months ago
|
// Example IDL file for our monster's schema.
|
||
|
|
||
|
namespace MyGame.Sample;
|
||
|
|
||
|
enum Color:byte { Red = 0, Green, Blue = 2 }
|
||
|
|
||
|
union Equipment { Weapon } // Optionally add more tables.
|
||
|
|
||
|
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;
|
||
|
weapons:[Weapon];
|
||
|
equipped:Equipment;
|
||
|
path:[Vec3];
|
||
|
}
|
||
|
|
||
|
table Weapon {
|
||
|
name:string;
|
||
|
damage:short;
|
||
|
}
|
||
|
|
||
|
root_type Monster;
|