A Smoll game engine
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 rivejä
865 B

using Raylib_cs;
using Smoll;
using Smoll.Ex1;
Layer layer = new Layer();
var entity = new Entity(layer);
entity.Attach(new Transform2DComponent(128, 128, 0));
entity.Attach(new RectangleGizmoComponent(128, 64, Color.Blue));
entity.Attach(new ExampleInputComponent(100f, 0.25f));
entity.Attach(new CrosshairGizmoComponent());
var entity2 = new Entity(entity);
entity2.Attach(new Transform2DComponent(128, 128, 0));
entity2.Attach(new RectangleGizmoComponent(64, 64, Color.Red));
entity2.Attach(new CrosshairGizmoComponent());
Engine engine = new Engine();
engine.layers.Add(layer);
Raylib.InitWindow(800, 600, "Smoll");
while(!Raylib.WindowShouldClose()) {
engine.Update();
Raylib.BeginDrawing();
Raylib.ClearBackground(Color.White);
engine.Draw();
Raylib.DrawFPS(0,0);
Raylib.EndDrawing();
GC.Collect(0);
}
Raylib.CloseWindow();