public override void Start() { IResourceContainer container = Player.Player.Resources; foreach (Multiplier multiplier in GetMultipliers()) { Resource resource = Resource.GetResource(multiplier.ResourceIdentifier); container.SetResource(resource, Mathf.RoundToInt(container.GetResource(resource) * multiplier.Value)); } }
public static void SetResource(this IResourceContainer container, Resource resource, int value) => container.SetResource(resource, value, false);