add swift flatbuffers
This commit is contained in:
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
enum Color:byte { red, green, blue }
|
||||
@@ -0,0 +1,6 @@
|
||||
enum Color:byte { red, green, blue }
|
||||
|
||||
struct Vec3 {
|
||||
x:float;
|
||||
y:float;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
enum Color:byte { red, green, blue }
|
||||
|
||||
struct Vec3 {
|
||||
x:float;
|
||||
y:float;
|
||||
}
|
||||
|
||||
table Monster {
|
||||
pos:Vec3;
|
||||
color:Color = Blue;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
enum Color:byte { red, green, blue }
|
||||
|
||||
struct Vec3 {
|
||||
x:float;
|
||||
y:float;
|
||||
}
|
||||
|
||||
table Monster {
|
||||
pos:Vec3;
|
||||
color:Color = Blue;
|
||||
|
||||
mana:short = 150;
|
||||
hp:short = 100;
|
||||
name:string;
|
||||
equipped:Equipment;
|
||||
weapons:[Weapon];
|
||||
path:[Vec3];
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
enum Color:byte { red, green, blue }
|
||||
|
||||
union Equipment { Weapon } // Optionally add more tables.
|
||||
|
||||
struct Vec3 {
|
||||
x:float;
|
||||
y:float;
|
||||
}
|
||||
|
||||
table Monster {
|
||||
pos:Vec3;
|
||||
color:Color = Blue;
|
||||
|
||||
mana:short = 150;
|
||||
hp:short = 100;
|
||||
name:string;
|
||||
equipped:Equipment;
|
||||
weapons:[Weapon];
|
||||
path:[Vec3];
|
||||
}
|
||||
|
||||
table Weapon {
|
||||
name:string;
|
||||
damage:short;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
enum Color:byte { red, green, blue }
|
||||
|
||||
union Equipment { Weapon } // Optionally add more tables.
|
||||
|
||||
struct Vec3 {
|
||||
x:float;
|
||||
y:float;
|
||||
}
|
||||
|
||||
table Monster {
|
||||
pos:Vec3;
|
||||
color:Color = Blue;
|
||||
|
||||
mana:short = 150;
|
||||
hp:short = 100;
|
||||
name:string;
|
||||
equipped:Equipment;
|
||||
weapons:[Weapon];
|
||||
path:[Vec3];
|
||||
}
|
||||
|
||||
table Weapon {
|
||||
name:string;
|
||||
damage:short;
|
||||
}
|
||||
|
||||
root_type Monster; // flatc --swift monster.fbs
|
||||
Reference in New Issue
Block a user