public override void OnStart()
 {
     // Find the limited resource object from the target. If the resource is null then check the parent.
     if ((limitedResource = limitedResourceTransform.Value.GetComponent<LimitedResource>()) == null) {
         limitedResource = limitedResourceTransform.Value.parent.GetComponent<LimitedResource>();
     }
 }
Exemple #2
0
 public override void OnStart()
 {
     // Find the limited resource object from the target. If the resource is null then check the parent.
     if ((limitedResource = limitedResourceTransform.Value.GetComponent <LimitedResource>()) == null)
     {
         limitedResource = limitedResourceTransform.Value.parent.GetComponent <LimitedResource>();
     }
 }