Closed laurentopia closed 7 years ago
primitiveresource.cs doesn't shrink the resource as intended so it should be:
`using UnityEngine; using System.Collections;
public class PrimitiveResource : Resource { public float MinScalePercentage = 0.1f; private Vector3 startingScale;
protected override void Awake () { base.Awake (); startingScale = transform.localScale; }
public override void RemoveResource(float value) { base.RemoveResource(value); transform.localScale = startingScale (MinScalePercentage + (1f - MinScalePercentage) (Capacity/startingCapacity)); // scale down based on capacity } }`
You could have made a pull request!
Anyway appreciated the code and added it to the current master.
primitiveresource.cs doesn't shrink the resource as intended so it should be:
`using UnityEngine; using System.Collections;
public class PrimitiveResource : Resource { public float MinScalePercentage = 0.1f; private Vector3 startingScale;
protected override void Awake () { base.Awake (); startingScale = transform.localScale; }
public override void RemoveResource(float value) { base.RemoveResource(value); transform.localScale = startingScale (MinScalePercentage + (1f - MinScalePercentage) (Capacity/startingCapacity)); // scale down based on capacity } }`