I am trying to store a method as a variable, but I don’t know how. I have a weapon script that I am using to set all of my munition types, damages, ranges, etc. I used enums to list some of the basic weapon styles, such as missile, assault rifle, sniper rifle,etc. What I want to do is call one firing method for the rifles and a different firing method for the missile functions. I planned on storing the the method in a “var” according to a switch for the enum, but I get errors when I do that
( Error CS0815: Cannot assign void to an implicitly-typed local variable (CS0815))
how can I switch the method for firing depending on what my weaponType enum is?