Add project files.
This commit is contained in:
20
AlientAttack.MonoGame/Things/SpriteUpdateContext.cs
Normal file
20
AlientAttack.MonoGame/Things/SpriteUpdateContext.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using AlienAttack.MonoGame.View;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
|
||||
namespace AlienAttack.MonoGame.Things;
|
||||
|
||||
public class SpriteUpdateContext(AlienAttackGame game)
|
||||
{
|
||||
public ViewTransform ViewTransform => game.ViewTransform;
|
||||
public required Action<Sprite> SpawnSprite { get; init; }
|
||||
public required Random Random { get; init; }
|
||||
public required GameTime GameTime { get; init; }
|
||||
}
|
||||
|
||||
public class SpriteCollisionContext(AlienAttackGame game)
|
||||
{
|
||||
public ViewTransform ViewTransform => game.ViewTransform;
|
||||
public required Sprite Sprite { get; init; }
|
||||
public required Action<Sprite> SpawnSprite { get; init; }
|
||||
}
|
||||
Reference in New Issue
Block a user