public void ExecuteOnTarget(HeroKitObject targetObject, bool useLayers) { // get the jump script & set values HeroSettings3D moveObject = targetObject.GetHeroComponent <HeroSettings3D>("HeroSettings3D", true); moveObject.useLayerMask = useLayers; moveObject.layermaskCollide = LayerMaskValue.GetValue(heroKitObject, 3); }
public void ExecuteOnTarget(HeroKitObject targetObject, bool useLayers) { // get the jump script & set values HeroSettings2D moveObject = targetObject.GetHeroComponent <HeroSettings2D>("HeroSettings2D", true); moveObject.useJumpLayermask = useLayers; moveObject.jumpLayermask = LayerMaskValue.GetValue(heroKitObject, 3); //if (!moveObject.haveJumped) //{ // moveObject.enabled = false; //} }
// Execute the action public int Execute(HeroKitObject hko) { heroKitObject = hko; HeroKitObject[] targetObject = HeroObjectFieldValue.GetValueE(heroKitObject, 0, 1); int layerMask = LayerMaskValue.GetValue(heroKitObject, 2); bool runThis = (targetObject != null); // execute action for all objects in list for (int i = 0; runThis && i < targetObject.Length; i++) { ExecuteOnTarget(targetObject[i], layerMask); } if (heroKitObject.debugHeroObject) { Debug.Log(HeroKitCommonRuntime.GetActionDebugInfo(heroKitObject)); } return(-99); }