Add project files.

This commit is contained in:
2025-12-16 08:51:34 -05:00
parent ed4d50a5bd
commit f7e3fe0a47
140 changed files with 2946 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
using AlienAttack.MonoGame.View;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
namespace AlienAttack.MonoGame.GameLoops;
internal abstract class GameLoopBase(AlienAttackGame game) : IGameLoop
{
protected readonly AlienAttackGame Game = game;
protected readonly ContentManager Content = game.Content;
protected readonly SpriteBatch SpriteBatch = game.SpriteBatch;
protected readonly ViewTransform ViewTransform = game.ViewTransform;
public void Draw()
{
SpriteBatch.Begin(transformMatrix: ViewTransform.ViewMatrix);
OnDraw();
SpriteBatch.End();
}
public void Update(GameTime gameTime)
{
OnUpdate(gameTime);
}
public abstract void OnDraw();
public abstract void OnUpdate(GameTime gameTime);
}