2019-09-01 11:55:41 +02:00
|
|
|
using Microsoft.Xna.Framework;
|
|
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
|
|
using MLEM.Input;
|
|
|
|
using MLEM.Startup;
|
|
|
|
using MLEM.Ui;
|
2020-07-17 14:56:22 +02:00
|
|
|
using MLEM.Ui.Elements;
|
2019-09-01 11:55:41 +02:00
|
|
|
|
|
|
|
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;
|
2020-07-17 14:56:22 +02:00
|
|
|
public Element UiRoot => this.UiSystem.Get("DemoUi").Element;
|
2019-09-01 11:55:41 +02:00
|
|
|
|
|
|
|
public Demo(MlemGame game) {
|
|
|
|
this.Game = game;
|
|
|
|
}
|
|
|
|
|
2021-12-28 14:56:11 +01:00
|
|
|
public virtual void LoadContent() {}
|
2019-09-01 11:55:41 +02:00
|
|
|
|
2021-12-28 14:56:11 +01:00
|
|
|
public virtual void Update(GameTime time) {}
|
2019-09-01 11:55:41 +02:00
|
|
|
|
2021-12-28 14:56:11 +01:00
|
|
|
public virtual void DoDraw(GameTime time) {}
|
2019-09-01 11:55:41 +02:00
|
|
|
|
2021-12-28 14:56:11 +01:00
|
|
|
public virtual void Clear() {}
|
2019-09-01 11:55:41 +02:00
|
|
|
|
|
|
|
public static T LoadContent<T>(string name) {
|
|
|
|
return MlemGame.LoadContent<T>(name);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|