Added more sound effects. Added initial weapon muzzle fire logic.
This commit is contained in:
@@ -14,7 +14,7 @@ internal class RedEnemy : EnemyShip
|
||||
public RedEnemy(int x, int y) : base(x, y)
|
||||
{
|
||||
BoundBox = new Rectangle(0, 0, 64, 64);
|
||||
YVelocity = 2;
|
||||
YVelocity = 1.5f;
|
||||
}
|
||||
|
||||
public override void Draw(SpriteDrawArgs args)
|
||||
@@ -88,12 +88,13 @@ internal class RedEnemy : EnemyShip
|
||||
CurrentFireThreshold--;
|
||||
}
|
||||
|
||||
if (CurrentFireThreshold == 0 && context.Random.Next(0, 20) == 1)
|
||||
if (CurrentFireThreshold == 0 && context.Random.Next(0, 50) == 1)
|
||||
{
|
||||
float originX = XPosition + (BoundBox.Width / 2) - (7 / 2);
|
||||
|
||||
context.SpawnSprite(new MinigunBulletSmall(originX - 9, YPosition + BoundBox.Height - 12, 0, 2 + YVelocity, this));
|
||||
context.SpawnSprite(new MinigunBulletSmall(originX + 14, YPosition + BoundBox.Height - 12, 0, 2 + YVelocity, this));
|
||||
context.SpawnSprite(new MinigunBulletSmall(originX - 9, YPosition + BoundBox.Height - 12, -1, 2 + YVelocity, this));
|
||||
context.SpawnSprite(new MinigunBulletSmall(originX + 3, YPosition + BoundBox.Height - 12, 0, 2 + YVelocity, this));
|
||||
context.SpawnSprite(new MinigunBulletSmall(originX + 14, YPosition + BoundBox.Height - 12, 1, 2 + YVelocity, this));
|
||||
|
||||
CurrentFireThreshold = FireThreshold;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user