mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-22 04:53:29 +01:00
added DoUpdate to MlemGame
This commit is contained in:
parent
0c74dfc38e
commit
f86944ee9a
3 changed files with 10 additions and 8 deletions
|
@ -79,8 +79,8 @@ namespace Demos {
|
|||
base.DoDraw(gameTime);
|
||||
}
|
||||
|
||||
protected override void Update(GameTime gameTime) {
|
||||
base.Update(gameTime);
|
||||
protected override void DoUpdate(GameTime gameTime) {
|
||||
base.DoUpdate(gameTime);
|
||||
if (this.activeDemo != null)
|
||||
this.activeDemo.Update(gameTime);
|
||||
}
|
||||
|
|
|
@ -40,12 +40,10 @@ namespace MLEM.Startup {
|
|||
this.OnLoadContent?.Invoke(this);
|
||||
}
|
||||
|
||||
protected override void Update(GameTime gameTime) {
|
||||
base.Update(gameTime);
|
||||
|
||||
protected sealed override void Update(GameTime gameTime) {
|
||||
this.InputHandler.Update();
|
||||
this.DoUpdate(gameTime);
|
||||
this.UiSystem.Update(gameTime);
|
||||
|
||||
this.OnUpdate?.Invoke(this, gameTime);
|
||||
CoroutineHandler.Tick(gameTime.GetElapsedSeconds());
|
||||
CoroutineHandler.RaiseEvent(CoroutineEvents.Update);
|
||||
|
@ -63,6 +61,10 @@ namespace MLEM.Startup {
|
|||
base.Draw(gameTime);
|
||||
}
|
||||
|
||||
protected virtual void DoUpdate(GameTime gameTime) {
|
||||
base.Update(gameTime);
|
||||
}
|
||||
|
||||
public static T LoadContent<T>(string name) {
|
||||
return instance.Content.Load<T>(name);
|
||||
}
|
||||
|
|
|
@ -59,8 +59,8 @@ namespace Sandbox {
|
|||
this.UiSystem.Add("Panel", panel);*/
|
||||
}
|
||||
|
||||
protected override void Update(GameTime gameTime) {
|
||||
base.Update(gameTime);
|
||||
protected override void DoUpdate(GameTime gameTime) {
|
||||
base.DoUpdate(gameTime);
|
||||
if (this.InputHandler.IsKeyPressed(Keys.F11))
|
||||
this.GraphicsDeviceManager.SetFullscreen(!this.GraphicsDeviceManager.IsFullScreen);
|
||||
|
||||
|
|
Loading…
Reference in a new issue