15 lines
384 B
C#
15 lines
384 B
C#
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);
|
|
}
|
|
} |