Adding separation between firing weapons and grenades

Al Heck
Jul 19, 2022

--

Right now, there should be an issue between the grenades and the guns because the grenades will operate differently. They don’t have a fire animation so they basically loop. Let’s adjust this so weapons that fire bullets animate differently.

I know my current idle state determines if I’m shooting a pistol, a machine gun, or a grenade. Let’s pass in a parameter to avoid issues.

Now when swapping between, there should be no null check errors.

--

--

Al Heck

Unity Developer and Software Engineer who loves making games with GameDevHQ