1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-23 05:08:34 +01:00
MLEM/Demos/Demo.cs

36 lines
960 B
C#
Raw Normal View History

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using MLEM.Input;
using MLEM.Startup;
using MLEM.Ui;
using MLEM.Ui.Elements;
namespace Demos {
public class Demo {
public readonly MlemGame Game;
public SpriteBatch SpriteBatch => this.Game.SpriteBatch;
public GraphicsDevice GraphicsDevice => this.Game.GraphicsDevice;
public InputHandler InputHandler => this.Game.InputHandler;
public UiSystem UiSystem => this.Game.UiSystem;
public Element UiRoot => this.UiSystem.Get("DemoUi").Element;
public Demo(MlemGame game) {
this.Game = game;
}
2021-12-28 14:56:11 +01:00
public virtual void LoadContent() {}
2021-12-28 14:56:11 +01:00
public virtual void Update(GameTime time) {}
2021-12-28 14:56:11 +01:00
public virtual void DoDraw(GameTime time) {}
2021-12-28 14:56:11 +01:00
public virtual void Clear() {}
public static T LoadContent<T>(string name) {
return MlemGame.LoadContent<T>(name);
}
}
2022-06-17 18:23:47 +02:00
}