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

@@ -0,0 +1,43 @@
using AlienAttack.MonoGame.Things.Bullets;
using AlienAttack.MonoGame.Things.Muzzles;
using Microsoft.Xna.Framework;
using System;
namespace AlienAttack.MonoGame.Things.Weapons;
internal record FireBulletContext
{
public Sprite Owner { get; init; }
public SpriteUpdateContext SpriteUpdateContext { get; init; }
public int BulletWidth { get; init; }
public int BulletHeight { get; init; }
public Anchor Anchor { get; init; }
public Shot[] Shots { get; init; }
public Func<float, float, float, float, Sprite, Bullet> Factory { get; init; }
}
public record Shot
{
public float OffsetX { get; init; }
public float OffsetY { get; init; }
public float XVelocity { get; init; }
public float YVelocity { get; init; }
}
internal record FireBulletFromMuzzleContext
{
public Sprite Owner { get; init; }
public SpriteUpdateContext SpriteUpdateContext { get; init; }
public int BulletWidth { get; init; }
public int BulletHeight { get; init; }
public MuzzleShot[] Shots { get; init; }
public Vector2 ExtraOffset { get; init; } = default;
public Func<float, float, float, float, Sprite, Bullet> Factory { get; init; }
}
public record MuzzleShot
{
public MuzzleId Muzzle { get; init; }
public float XVelocity { get; init; }
public float YVelocity { get; init; }
}