So there are many RPG games.
At almost all games, now equipment and equip functions are normal and essential in game system.
So, how to implement this?
I did like,
-
First make itemgeneral class, and equipmentgeneral class inherit this.
And weapongeneral, armorgeneral inherit equipmentgeneral.
And then make bunch of specific each class like shortsword, shieldsmall, etc represented each specific equipment. -
Make virtual Equip function inside EquipmentGeneral abstract class. Like,
public virtual void ApplyEquip(AllyClass who, EquipType where)
{
So each equipment itself will have Equip function.
Is this right way?