|
|
- 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();
|