I am having some trouble with my new class called Itembase its for adding gear to my game
[System.Serializable]
public class Itembase
{
public string name;
public int itemid;
public int baseprice;
}
[System.Serializable]
public class weapon : Itembase
{
public bool isranged;
public element weaponelement;
public int damage;
public Player equip;
public weapon(string name,int itemid,int baseprice,bool isranged,element weaponelement,int damage,Player equip)
{
super.name = name;
super.itemid = itemid;
super.baseprice = baseprice;
this.isranged = isranged;
this.weaponelement = weaponelement;
this.damage = damage;
this.equip = equip;
}
}
enum element
{
Physical,
Fire,
Ice,
Lightning,
Earth
}
this is from my playerstats:
public PlayerStats(Player player,int level, string name, int STR, int DEX, int DEF, int vital, int Magic, int luck, int speed, int Agility, int exp)
{
this.player = player;
this.level = 1;
this.name = name;
this.STR = STR;
this.DEF = DEF;
this.vital = vital;
this.Magic = Magic;
this.luck = luck;
this.Speed = speed;
this.Agility = Agility;
this.DEX = DEX;
addexp(exp);
}
tell me what I am doing wrong this is what the error is:
Inconsistent accessibility: field type Player' is less accessible than field
PlayerStats.player’