private static SetFloatValue _getOrCacheFSMSetFloatValue(string stateName, string fsmName, GameObject go, int index) { SetFloatValue outVal = null; PlayMakerFSM myFsm = _getOrCacheFSM(fsmName, go); if (index < 0) { FsmState myState; if (myFsm != null) { myState = myFsm.GetState(stateName); } else { return(null); } if (myState != null) { outVal = (SetFloatValue)myState.Actions.FirstOrDefault(setFloat => setFloat is SetFloatValue); } return(outVal); } else { return(FsmUtil.GetAction <SetFloatValue>(myFsm, stateName, index)); } }
public SetFloatValueData(float magnitudeFactor, SetFloatValue cachedFloatValue) { Factor = magnitudeFactor; this.cachedFloatValue = cachedFloatValue; CustomGameObject = cachedFloatValue.Owner; FSMName = cachedFloatValue.Fsm.Name; FSMStateName = cachedFloatValue.State.Name; ElementIndex = -1; defaultValue = 0; }
public SetFloatValueData(float magnitudeFactor, string fsmName, string fsmStateName, int elementIndex = -1, GameObject customGameObject = null) { CustomGameObject = customGameObject; FSMName = fsmName; FSMStateName = fsmStateName; Factor = magnitudeFactor; defaultValue = 0; this.cachedFloatValue = null; this.ElementIndex = elementIndex; }