/// <summary> /// Checks if the player can afford a resource.ResourceName of a certain value /// </summary> /// <param name="resourceValue">Holds data for the resource.ResourceName and the value to add</param> /// <param name="trueCost">Whether to use the raw cost (>= 0) or the true cost (can be less than 0)</param> /// <returns></returns> public bool CanAfford(Mod_ResourceValue resourceValue, bool trueCost = true) { return(CanAfford(resourceValue.ResourceType, (trueCost ? resourceValue.TrueValue : resourceValue.RawValue))); }
/// <summary> /// Add a Mod_ResourceValue to its respective resource.ResourceName type /// </summary> /// <param name="resourceValue">Mod_ResourceValue to add</param> /// <returns></returns> public bool AddResource(Mod_ResourceValue resourceValue) { return(AddResource(resourceValue.ResourceType, resourceValue.TrueValue)); }