|
|
@ -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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|