Making a complex hand cannon
This section is going to be somewhat beefy, partly because we will be implementing a lot of different features into this hand cannon. Although it would probably be good to split this up into multiple chapters and focus on the different implementations of HandCannon
, we’ll cover all the hand cannon stuff first before revisiting the concepts of projectiles. More importantly, this builds on the foundation we already have, so it’s not necessary to walk through the basics of developing something like this at this point in this book. By the end of this section, you’ll have a solid understanding of how to create projectile sources, which will lay the foundation for when we add our projectiles since it’ll give you a lot of ideas of what projectiles can be used for this cannon.
As mentioned previously, we’re going to cover a lot of different things. We’ll start by making a C# script that allows us to put everything we...