Add project files.
This commit is contained in:
15
AlientAttack.MonoGame/Things/MoveableSprite.cs
Normal file
15
AlientAttack.MonoGame/Things/MoveableSprite.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace AlienAttack.MonoGame.Things;
|
||||
|
||||
public class MoveableSprite(int x, int y) : Sprite(x, y)
|
||||
{
|
||||
public float XVelocity { get; protected set; } = 0;
|
||||
public float YVelocity { get; protected set; } = 0;
|
||||
|
||||
public override void Update(SpriteUpdateContext context)
|
||||
{
|
||||
XPosition += XVelocity;
|
||||
YPosition += YVelocity;
|
||||
|
||||
base.Update(context);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user