Add project files.

This commit is contained in:
2025-12-16 08:51:34 -05:00
parent ed4d50a5bd
commit f7e3fe0a47
140 changed files with 2946 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
namespace AlienAttack.MonoGame.Things.Bullets;
internal class MinigunBulletSmall : Bullet
{
public MinigunBulletSmall(float x, float y, float xVel, float yVel, Sprite owner) : base(x, y, xVel, yVel, owner)
{
XVelocity = xVel;
YVelocity = yVel;
Owner = owner;
Damage = 1;
}
public override void Draw(SpriteDrawArgs args)
{
Texture2D texture = args.Content.Load<Texture2D>(@$"Sprites\Minigun_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);
}
}