Updated enemies. Added boost.
This commit is contained in:
@@ -21,7 +21,8 @@ internal enum MoveFlag
|
||||
Left = 1,
|
||||
Right = 2,
|
||||
Up = 4,
|
||||
Down = 8
|
||||
Down = 8,
|
||||
Boost = 16
|
||||
}
|
||||
|
||||
public class DrwaState
|
||||
@@ -184,6 +185,11 @@ internal class Player : MoveableSprite
|
||||
MoveThreshold = 0;
|
||||
}
|
||||
|
||||
if (MoveFlags.HasFlag(MoveFlag.Boost))
|
||||
{
|
||||
XVelocity *= 1.5f;
|
||||
}
|
||||
|
||||
if (XPosition < 0)
|
||||
{
|
||||
XPosition = 0;
|
||||
@@ -229,6 +235,11 @@ internal class Player : MoveableSprite
|
||||
{
|
||||
MoveFlags |= MoveFlag.Right;
|
||||
}
|
||||
|
||||
if (gamepadState.Buttons.RightShoulder == ButtonState.Pressed)
|
||||
{
|
||||
MoveFlags |= MoveFlag.Boost;
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckFire(SpriteUpdateContext context)
|
||||
|
||||
Reference in New Issue
Block a user