Let’s say I have a PlayerWeapon class, like so:
public class PlayerWeapon
{
public Texture weaponTexture;
public string weaponName;
public int weaponDamage;
public int fireRate;
public int securityLevel;
public Sprite inGameSprite;
public PlayerWeapon(Texture texture, Sprite ingame, string name, int damage, int rate, int level)
{
weaponTexture = texture;
weaponName = name;
weaponDamage = damage;
fireRate = rate;
securityLevel = level;
inGameSprite = ingame;
}
}
What would be the best way to define weapons that use this structure outside of the game? Some sort of XML parser? Just defining weapons as classes that inherit from the PlayerWeapon class?