public bool GetVariable(PlayMakerFsmVariableTarget variableTarget) { initialized = true; targetUndefined = true; if (variableTarget.FsmVariables != null) { targetUndefined = false; variableNameToUse = string.IsNullOrEmpty(variableName)?defaultVariableName:variableName; fsmVariables = variableTarget.FsmVariables; _namedVariable = fsmVariables.GetVariable(variableNameToUse); if (_namedVariable != null) { #if PLAYMAKER_1_8 selectedType = _namedVariable.VariableType; #else selectedType = GetTypeFromChoice(variableSelectionChoice); #endif return(true); } } selectedType = VariableType.Unknown; return(false); }
public bool GetVariable(PlayMakerFsmVariableTarget variableTarget) { initialized = true; targetUndefined = true; if (variableTarget.FsmVariables !=null) { targetUndefined = false; variableNameToUse = string.IsNullOrEmpty(variableName)?defaultVariableName:variableName; fsmVariables = variableTarget.FsmVariables; _namedVariable = fsmVariables.GetVariable(variableNameToUse); if (_namedVariable !=null) { #if PLAYMAKER_1_8 selectedType = _namedVariable.VariableType; #else selectedType = GetTypeFromChoice(variableSelectionChoice); #endif return true; } } selectedType = VariableType.Unknown; return false; }
protected override void InitGDE() { FsmVariables vars = PlayMakerGlobals.Instance.Variables; if (isGDEInitialized == null) { isGDEInitialized = vars.GetVariable("gde_initialized") as FsmBool; } if (isGDEInitialized != null && isGDEInitialized.Value == true) { single_bool = vars.GetVariable("single_bool") as FsmBool; single_custom_bool = vars.GetVariable("single_custom_bool") as FsmBool; single_float = vars.GetVariable("single_float") as FsmFloat; single_custom_float = vars.GetVariable("single_custom_float") as FsmFloat; single_int = vars.GetVariable("single_int") as FsmInt; single_custom_int = vars.GetVariable("single_custom_int") as FsmInt; single_string = vars.GetVariable("single_string") as FsmString; single_custom_string = vars.GetVariable("single_custom_string") as FsmString; single_custom = vars.GetVariable("single_custom") as FsmString; single_vec2 = vars.GetVariable("single_vector2") as FsmVector2; single_custom_vec2 = vars.GetVariable("single_custom_vector2") as FsmVector2; single_vec3 = vars.GetVariable("single_vector3") as FsmVector3; single_custom_vec3 = vars.GetVariable("single_custom_vector3") as FsmVector3; single_color = vars.GetVariable("single_color") as FsmColor; single_custom_color = vars.GetVariable("single_custom_color") as FsmColor; } }
public void Apply(FsmVariables variables) { variable = variables.GetVariable(variable.Name); fsmVar.ApplyValueTo(variable); }