public ResourceStat getResourceNeed(TypeOfResource.Type type) { if ((int)type < Resources.Count) { return(Resources[(int)type]); } return(null); }
public bool AddResourceNeed(TypeOfResource.Type type, float Value) { ResourceStat resourceNeed = getResourceNeed(type); if (resourceNeed != null && Value > 0) { resourceNeed.AddValue(Value); SaveResouce(); return(true); } return(false); }