Added more sound effects. Added initial weapon muzzle fire logic.

This commit is contained in:
2026-01-02 00:54:09 -05:00
parent c4a98ce03d
commit df45203227
43 changed files with 459 additions and 30 deletions

View File

@@ -2,6 +2,8 @@
internal class Ammo : Item
{
protected override PickupKind Kind => PickupKind.Ammo;
public Ammo(int x, int y) : base(x, y)
{
TextureName = @$"Sprites\Powerup_Ammo";

View File

@@ -2,6 +2,8 @@
internal class Energy : Item
{
protected override PickupKind Kind => PickupKind.Plasma;
public Energy(int x, int y) : base(x, y)
{
TextureName = @$"Sprites\Powerup_Energy";

View File

@@ -2,6 +2,8 @@
internal class Health : Item
{
protected override PickupKind Kind => PickupKind.Health;
public Health(int x, int y) : base(x, y)
{
TextureName = @$"Sprites\Powerup_Health";

View File

@@ -14,6 +14,8 @@ internal abstract class Item : MoveableSprite
protected string TextureName;
protected abstract PickupKind Kind { get; }
public Item(int x, int y) : base(x, y)
{
YVelocity = .5f;
@@ -61,6 +63,7 @@ internal abstract class Item : MoveableSprite
{
IsDead = true;
ApplyEffect(player);
context.AudioManager.PlayPickup(Kind);
}
}

View File

@@ -0,0 +1,10 @@
namespace AlienAttack.MonoGame.Things.Items;
public enum PickupKind
{
Health,
Shield,
Ammo,
Rockets,
Plasma
}

View File

@@ -2,6 +2,8 @@
internal class Rockets : Item
{
protected override PickupKind Kind => PickupKind.Rockets;
public Rockets(int x, int y) : base(x, y)
{
TextureName = @$"Sprites\Powerup_Rockets";

View File

@@ -2,6 +2,8 @@
internal class Shields : Item
{
protected override PickupKind Kind => PickupKind.Shield;
public Shields(int x, int y) : base(x, y)
{
TextureName = @$"Sprites\Powerup_Shields";