ahhhhh
This commit is contained in:
parent
380dc7d68e
commit
13ae79ae3e
@ -36,7 +36,7 @@ fn GetSignature(entity: Etyp.Entity) Etyp.Signature {
|
|||||||
|
|
||||||
var ComponentTypeList: std.StringArrayHashMap(Etyp.Component) = std.StringArrayHashMap(Etyp.Component).init(std.heap.page_allocator);
|
var ComponentTypeList: std.StringArrayHashMap(Etyp.Component) = std.StringArrayHashMap(Etyp.Component).init(std.heap.page_allocator);
|
||||||
|
|
||||||
var ComponentArrays = undefined;
|
var ComponentArrays: std.StringArrayHashMap(usize) = std.StringArrayHashMap(usize).init(std.heap.page_allocator);
|
||||||
var String2CompArr: std.StringArrayHashMap(usize) = std.StringArrayHashMap(usize).init(std.heap.page_allocator);
|
var String2CompArr: std.StringArrayHashMap(usize) = std.StringArrayHashMap(usize).init(std.heap.page_allocator);
|
||||||
|
|
||||||
var NextComponent: Etyp.Component = 0;
|
var NextComponent: Etyp.Component = 0;
|
||||||
|
@ -17,18 +17,13 @@ pub fn main() anyerror!void {
|
|||||||
try EnS.Init();
|
try EnS.Init();
|
||||||
try EnS.RegisterComponent(Etyp.Transform);
|
try EnS.RegisterComponent(Etyp.Transform);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var player = try EnS.CreateEntity();
|
var player = try EnS.CreateEntity();
|
||||||
|
|
||||||
EnS.AddComponent(player, Etyp.Transform{ .pos = rl.Vector2.init(0, 0), .rot = 0 });
|
EnS.AddComponent(player, Etyp.Transform{ .pos = rl.Vector2.init(0, 0), .rot = 0 });
|
||||||
|
|
||||||
|
|
||||||
while (!rl.windowShouldClose()) {
|
while (!rl.windowShouldClose()) {
|
||||||
Etyp.Systems.Gravity();
|
Etyp.Systems.Gravity();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
rl.beginDrawing();
|
rl.beginDrawing();
|
||||||
defer rl.endDrawing();
|
defer rl.endDrawing();
|
||||||
var pos = EnS.GetComponent(player, Etyp.Transform).pos;
|
var pos = EnS.GetComponent(player, Etyp.Transform).pos;
|
||||||
@ -39,4 +34,3 @@ pub fn main() anyerror!void {
|
|||||||
rl.drawFPS(10, 10);
|
rl.drawFPS(10, 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user