🪙 Installation - Nuget
dotnet add package Sparkle --version 4.0.1
We trust you'll relish your time with Sparkle! To kick things off, head over to our Wiki for a seamless start.
📚 Libraries - Nuget
- Using
OpenGL-4.3
- Using
OpenGL-4.3
- Using
OpenGL-3.3
public class GameTest : Game {
public Texture2D Texture;
public GameTest(GameSettings settings) : base(settings) {
// Create your own config file!
JsonConfig config = new JsonConfigBuilder("config", "test")
.Add("Hello", "Hello World!")
.Add("Bye", 1000)
.Build();
Logger.Info(config.GetValue<string>("Hello"));
}
protected override void Init() {
base.Init();
}
protected override void Load() {
base.Load();
// Load resources.
this.Texture = this.Content.Load(new TextureContent("icon.png"));
}
protected override void Draw() {
base.Draw();
// Draw circle if "A" down.
if (Input.IsKeyDown(KeyboardKey.A)) {
Graphics.DrawCircle(new Vector2(50, 50), 20, Color.Blue);
}
// Draw texture if "B" down.
if (Input.IsKeyDown(KeyboardKey.B)) {
Graphics.DrawTexture(this.Texture, Vector3.Zero, Color.White);
}
}
}
Please consider SPONSOR me to further help development and to allow faster issue triaging and new features to be implemented.