Added other bullet classes. Add plasma pickup audio.

This commit is contained in:
2026-01-03 14:54:22 -05:00
parent d9d8a08d46
commit 79fd63c3ce
32 changed files with 402 additions and 52 deletions

View File

@@ -0,0 +1,27 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
namespace AlienAttack.MonoGame.Things.Bullets;
internal class LaserBulletSmall : Bullet
{
public const int Width = 6;
public const int Height = 18;
public LaserBulletSmall(float x, float y, float xVel, float yVel, Sprite owner) : base(x, y, xVel, yVel, owner)
{
BoundBox = new(0, 0, Width, Height);
Damage = 1;
}
public override void Draw(SpriteDrawArgs args)
{
Texture2D texture = args.Content.Load<Texture2D>(@$"Sprites\Laser_Small");
float rotation = MathF.Atan2(YVelocity, XVelocity) + MathF.PI / 2f;
Vector2 origin = new(texture.Width / 2f, texture.Height / 2f);
args.SpriteBatch.Draw(texture, Position, null, DrawColor, rotation, origin, 1f, SpriteEffects.None, 1);
}
}