Exemplo n.º 1
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>();
     }
 }
Exemplo n.º 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>();
     }
 }