Added more sound effects. Added initial weapon muzzle fire logic.
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
10
AlientAttack.MonoGame/Things/Items/PickupKind.cs
Normal file
10
AlientAttack.MonoGame/Things/Items/PickupKind.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace AlienAttack.MonoGame.Things.Items;
|
||||
|
||||
public enum PickupKind
|
||||
{
|
||||
Health,
|
||||
Shield,
|
||||
Ammo,
|
||||
Rockets,
|
||||
Plasma
|
||||
}
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user