monster.fbs 518 B

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