hadean-zig/src/scenes.zig

20 lines
550 B
Zig
Raw Normal View History

2024-08-23 17:22:01 -04:00
const Scene = @import("Scene.zig");
const Terrain = @import("Terrain.zig");
2024-09-03 13:13:28 -04:00
const Pawn = @import("Pawn.zig");
const Camera = @import("Camera.zig");
2024-09-20 18:00:50 -04:00
const Selection = @import("Selection.zig");
2024-08-23 17:22:01 -04:00
pub fn game() !Scene {
var scene = Scene.create();
// first try is for allocating more memory in entities
// second try is for allocating terrain on the heap...
2024-09-03 13:13:28 -04:00
try scene.add(try Camera.create());
try scene.add(try Terrain.create(123));
2024-09-20 18:00:50 -04:00
try scene.add(try Selection.create());
2024-09-04 07:46:37 -04:00
for (0..5) |_| {
try scene.add(try Pawn.random());
}
2024-08-23 17:22:01 -04:00
return scene;
}