public EssenceItem GetEssenceOfType(AffType type) { foreach (EssenceItem op in Essences) { if (op.type == type) { return(op); } } return(Essences[0]); }
public Color GetAffColor(AffType type) { foreach (BaseAffinityData aff in baseAffinities) { if (aff.type == type) { return(aff.col); } } return(Color.magenta); }
public BaseAffinityData GetBaseAff(AffType type) { foreach (BaseAffinityData bad in baseAffinities) { if (bad.type == type) { return(bad); } } return(baseAffinities[0]); }
public Affinity GetAffValue(AffType t) { foreach (Affinity aff in affinities) { if (aff.type == t) { return(aff); } } return(new Affinity(AffType.none, 0)); }
public EssenceItem(AffType t, int q) { type = t; quantity = q; }
public void SetAffinityValue(AffType aff, float val) { GetAffValue(aff).value = val; }
public void ChangeAffinityValue(AffType aff, float delta) { GetAffValue(aff).value += delta; }
public Affinity(AffType t, float va) { type = t; value = va; }