1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-14 18:19:09 +01:00
MLEM/Tests/TestGame.cs

27 lines
656 B
C#
Raw Normal View History

using Microsoft.Xna.Framework.Graphics;
using MLEM.Data.Content;
using MLEM.Font;
2021-04-02 17:12:27 +02:00
using MLEM.Startup;
2022-12-13 13:11:36 +01:00
namespace Tests;
2021-04-02 17:12:27 +02:00
2022-10-27 10:22:25 +02:00
public class TestGame : MlemGame {
2021-04-02 17:12:27 +02:00
2022-10-27 10:22:25 +02:00
public RawContentManager RawContent { get; private set; }
2021-04-02 17:12:27 +02:00
2022-10-27 10:22:25 +02:00
private TestGame() {}
2021-04-02 17:12:27 +02:00
2022-10-27 10:22:25 +02:00
protected override void LoadContent() {
base.LoadContent();
this.RawContent = new RawContentManager(this.Services, this.Content.RootDirectory);
this.UiSystem.Style.Font = new GenericSpriteFont(MlemGame.LoadContent<SpriteFont>("TestFont"));
}
2021-04-02 17:12:27 +02:00
2022-10-27 10:22:25 +02:00
public static TestGame Create() {
var game = new TestGame();
game.RunOneFrame();
return game;
2021-04-02 17:12:27 +02:00
}
2022-10-27 10:22:25 +02:00
2022-06-17 18:23:47 +02:00
}