I have an enum that looks like the following:
public enum EnumWeapons
{
Fists = new WeaponFists(),
Sword = new WeaponSword(),
Bow = new WeaponBow(),
Staff = new WeaponStaff()
}
Which are derived from the base class Weapon.
Is it possible to use an enum in this way?
If so, will I be able to do something like the following? :
public Weapon weapon = (Weapon)EnumWeapons.Fists;
My attempts haven't worked as intended, and any help or guidance is appreciated :). Thank you!