error CS0246: The type or namespace name `Attribute’ could not be found. Are you missing a using directive or an assembly reference?
using System.Collections.Generic;
public class ModifiedStat : BaseStat {
private List _mods;
private int _modValue;
public ModifiedStat(){
_mods = new List();
_modValue = 0;
}
public void AddModifier(ModifyingAttribute mod){
_mods.Add(mod);
}
private void CalculateModValue(){
_modValue = 0;
if(_mods.Count > 0)
foreach(ModifyingAttribute att in _mods)
_modValue += (int)(att.attribute.AdjustedBaseLevel * att.ratio);
}
public int AdjustedBaseValue{
get{return BaseValue + BuffValue + _modValue; }
}
public void Update(){
CalculateModValue ();
}
}
public struct ModifyingAttribute {
public Attribute attribute;
public float ratio;
public ModifyingAttribute(Attribute att, float rat) {
attribute = att;
ratio = rat;
}
}