private void DoGetFsmVariable() { if (!storeValue.IsNone) { InitFsmVar(); storeValue.GetValueFrom(sourceVariable); storeValue.ApplyValueTo(targetVariable); } }
void DoGetFsmVariable() { if (storeValue.IsNone) { return; } InitFsmVar(); storeValue.GetValueFrom(sourceVariable); storeValue.ApplyValueTo(targetVariable); }
// ONLY WORKS IF THE FSMVAR POINTS TO A REGULAR FSM VARIABLE public static void RefreshValueFromFsmVar(Fsm fromFsm,FsmVar fsmVar) { switch (fsmVar.Type) { case VariableType.Int: fsmVar.GetValueFrom( (NamedVariable)fromFsm.Variables.GetFsmInt(fsmVar.variableName) ); break; case VariableType.Float: fsmVar.GetValueFrom( (NamedVariable)fromFsm.Variables.GetFsmFloat(fsmVar.variableName)); break; case VariableType.Bool: fsmVar.GetValueFrom( (NamedVariable)fromFsm.Variables.GetFsmBool(fsmVar.variableName)); break; case VariableType.Color: fsmVar.GetValueFrom( (NamedVariable)fromFsm.Variables.GetFsmColor(fsmVar.variableName)); break; case VariableType.Quaternion: fsmVar.GetValueFrom( (NamedVariable)fromFsm.Variables.GetFsmQuaternion(fsmVar.variableName)); break; case VariableType.Rect: fsmVar.GetValueFrom( (NamedVariable)fromFsm.Variables.GetFsmRect(fsmVar.variableName)); break; case VariableType.Vector2: fsmVar.GetValueFrom( (NamedVariable)fromFsm.Variables.GetFsmVector2(fsmVar.variableName)); break; case VariableType.Vector3: fsmVar.GetValueFrom( (NamedVariable)fromFsm.Variables.GetFsmVector3(fsmVar.variableName)); break; case VariableType.Texture: fsmVar.GetValueFrom( (NamedVariable)fromFsm.Variables.GetFsmVector3(fsmVar.variableName)); break; case VariableType.String: fsmVar.GetValueFrom( (NamedVariable)fromFsm.Variables.GetFsmString(fsmVar.variableName)); break; case VariableType.GameObject: fsmVar.GetValueFrom( (NamedVariable)fromFsm.Variables.GetFsmGameObject(fsmVar.variableName)); break; } }
// ONLY WORKS IF THE FSMVAR POINTS TO A REGULAR FSM VARIABLE public static void RefreshValueFromFsmVar(Fsm fromFsm,FsmVar fsmVar) { if (fromFsm==null) { return; } if (fsmVar==null) { return; } if (!fsmVar.useVariable) { return; } switch (fsmVar.Type) { case VariableType.Int: fsmVar.GetValueFrom( (NamedVariable)fromFsm.Variables.GetFsmInt(fsmVar.variableName) ); break; case VariableType.Float: fsmVar.GetValueFrom( (NamedVariable)fromFsm.Variables.GetFsmFloat(fsmVar.variableName)); break; case VariableType.Bool: fsmVar.GetValueFrom( (NamedVariable)fromFsm.Variables.GetFsmBool(fsmVar.variableName)); break; case VariableType.Color: fsmVar.GetValueFrom( (NamedVariable)fromFsm.Variables.GetFsmColor(fsmVar.variableName)); break; case VariableType.Quaternion: fsmVar.GetValueFrom( (NamedVariable)fromFsm.Variables.GetFsmQuaternion(fsmVar.variableName)); break; case VariableType.Rect: fsmVar.GetValueFrom( (NamedVariable)fromFsm.Variables.GetFsmRect(fsmVar.variableName)); break; case VariableType.Vector2: fsmVar.GetValueFrom( (NamedVariable)fromFsm.Variables.GetFsmVector2(fsmVar.variableName)); break; case VariableType.Vector3: fsmVar.GetValueFrom( (NamedVariable)fromFsm.Variables.GetFsmVector3(fsmVar.variableName)); break; case VariableType.Texture: fsmVar.GetValueFrom( (NamedVariable)fromFsm.Variables.GetFsmVector3(fsmVar.variableName)); break; case VariableType.Material: fsmVar.GetValueFrom( (NamedVariable)fromFsm.Variables.GetFsmMaterial(fsmVar.variableName)); break; case VariableType.String: fsmVar.GetValueFrom( (NamedVariable)fromFsm.Variables.GetFsmString(fsmVar.variableName)); break; case VariableType.GameObject: fsmVar.GetValueFrom( (NamedVariable)fromFsm.Variables.GetFsmGameObject(fsmVar.variableName)); break; #if PLAYMAKER_1_8 case VariableType.Enum: fsmVar.GetValueFrom( (NamedVariable)fromFsm.Variables.GetFsmEnum(fsmVar.variableName)); break; case VariableType.Array: fsmVar.GetValueFrom( (NamedVariable)fromFsm.Variables.GetFsmArray(fsmVar.variableName)); break; #endif } }
// ONLY WORKS IF THE FSMVAR POINTS TO A REGULAR FSM VARIABLE public static void RefreshValueFromFsmVar(Fsm fromFsm, FsmVar fsmVar) { if (fromFsm == null) { return; } if (fsmVar == null) { return; } if (!fsmVar.useVariable) { return; } switch (fsmVar.Type) { case VariableType.Int: fsmVar.GetValueFrom((NamedVariable)fromFsm.Variables.GetFsmInt(fsmVar.variableName)); break; case VariableType.Float: fsmVar.GetValueFrom((NamedVariable)fromFsm.Variables.GetFsmFloat(fsmVar.variableName)); break; case VariableType.Bool: fsmVar.GetValueFrom((NamedVariable)fromFsm.Variables.GetFsmBool(fsmVar.variableName)); break; case VariableType.Color: fsmVar.GetValueFrom((NamedVariable)fromFsm.Variables.GetFsmColor(fsmVar.variableName)); break; case VariableType.Quaternion: fsmVar.GetValueFrom((NamedVariable)fromFsm.Variables.GetFsmQuaternion(fsmVar.variableName)); break; case VariableType.Rect: fsmVar.GetValueFrom((NamedVariable)fromFsm.Variables.GetFsmRect(fsmVar.variableName)); break; case VariableType.Vector2: fsmVar.GetValueFrom((NamedVariable)fromFsm.Variables.GetFsmVector2(fsmVar.variableName)); break; case VariableType.Vector3: fsmVar.GetValueFrom((NamedVariable)fromFsm.Variables.GetFsmVector3(fsmVar.variableName)); break; case VariableType.Texture: fsmVar.GetValueFrom((NamedVariable)fromFsm.Variables.GetFsmVector3(fsmVar.variableName)); break; case VariableType.Material: fsmVar.GetValueFrom((NamedVariable)fromFsm.Variables.GetFsmMaterial(fsmVar.variableName)); break; case VariableType.String: fsmVar.GetValueFrom((NamedVariable)fromFsm.Variables.GetFsmString(fsmVar.variableName)); break; case VariableType.GameObject: fsmVar.GetValueFrom((NamedVariable)fromFsm.Variables.GetFsmGameObject(fsmVar.variableName)); break; #if PLAYMAKER_1_8 case VariableType.Enum: fsmVar.GetValueFrom((NamedVariable)fromFsm.Variables.GetFsmEnum(fsmVar.variableName)); break; case VariableType.Array: fsmVar.GetValueFrom((NamedVariable)fromFsm.Variables.GetFsmArray(fsmVar.variableName)); break; #endif } }
// ONLY WORKS IF THE FSMVAR POINTS TO A REGULAR FSM VARIABLE public static void RefreshValueFromFsmVar(Fsm fromFsm, FsmVar fsmVar) { switch (fsmVar.Type) { case VariableType.Int: fsmVar.GetValueFrom((NamedVariable)fromFsm.Variables.GetFsmInt(fsmVar.variableName)); break; case VariableType.Float: fsmVar.GetValueFrom((NamedVariable)fromFsm.Variables.GetFsmFloat(fsmVar.variableName)); break; case VariableType.Bool: fsmVar.GetValueFrom((NamedVariable)fromFsm.Variables.GetFsmBool(fsmVar.variableName)); break; case VariableType.Color: fsmVar.GetValueFrom((NamedVariable)fromFsm.Variables.GetFsmColor(fsmVar.variableName)); break; case VariableType.Quaternion: fsmVar.GetValueFrom((NamedVariable)fromFsm.Variables.GetFsmQuaternion(fsmVar.variableName)); break; case VariableType.Rect: fsmVar.GetValueFrom((NamedVariable)fromFsm.Variables.GetFsmRect(fsmVar.variableName)); break; case VariableType.Vector2: fsmVar.GetValueFrom((NamedVariable)fromFsm.Variables.GetFsmVector2(fsmVar.variableName)); break; case VariableType.Vector3: fsmVar.GetValueFrom((NamedVariable)fromFsm.Variables.GetFsmVector3(fsmVar.variableName)); break; case VariableType.Texture: fsmVar.GetValueFrom((NamedVariable)fromFsm.Variables.GetFsmVector3(fsmVar.variableName)); break; case VariableType.String: fsmVar.GetValueFrom((NamedVariable)fromFsm.Variables.GetFsmString(fsmVar.variableName)); break; case VariableType.GameObject: fsmVar.GetValueFrom((NamedVariable)fromFsm.Variables.GetFsmGameObject(fsmVar.variableName)); break; } }