I've developed a simple class and enum that will make ammunition creation and usage simpler in game development for those who are interested. I will be making a tutorial video on how I made this so that you will fully understand how the code works if you do not. Simply implement it into your game by declaring it, and using the methods and variables to your advantage. For example:
private Ammunition myAmmo = new Ammunition(30);
private void button1_Click(object s, EventArgs e)
{
// fire the gun, and output the remaining bullets to the screen for display
myAmmo.Fire(FireMode.ThreeShotBurst, false); // leave as false unless the user is firing their weapon on automatic.
label1.Text = "Ammo Left: " + myAmmo.ClipContents.ToString() + "/" + myAmmo.ClipCapacity.ToString();
}
Happy shootings,
Jamie