20 lines
642 B
C#
20 lines
642 B
C#
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; }
|
|
} |