public void EditorSetVariableData(QuaternionVariable global, QuaternionVariableInstanced instanced, Quaternion constant, AssignmentType type, IDTokenHolder tokenHolder) { _assignmentType = type; EditorSetTokenHolder(tokenHolder); switch (type) { case AssignmentType.Constant: _constantValue = constant; break; case AssignmentType.GlobalVariable: _globalVariable = global; break; case AssignmentType.PersonalVariable: _instancedVariable = instanced; break; } }
public void SetValue(QuaternionVariable value) { CurrentValue = value.CurrentValue; }
public void ApplyChange(QuaternionVariable amount) { Value *= amount.Value; }
public void PopulateContainer() { TriggerVariables.Clear(); BoolVariables.Clear(); IntVariables.Clear(); FloatVariables.Clear(); Vector2Variables.Clear(); Vector3Variables.Clear(); QuaternionVariables.Clear(); TimerVariables.Clear(); foreach (var propertyPath in AssetDatabaseUtils.GetAssetRelativePaths(FolderPath, IncludeSubdirectories)) { TriggerVariable assetAsTrigger = AssetDatabase.LoadAssetAtPath(propertyPath, typeof(TriggerVariable)) as TriggerVariable; if (assetAsTrigger != null) { TriggerVariables.Add(assetAsTrigger); continue; } BoolVariable assetAsBool = AssetDatabase.LoadAssetAtPath(propertyPath, typeof(BoolVariable)) as BoolVariable; if (assetAsBool != null) { BoolVariables.Add(assetAsBool); continue; } IntVariable assetAsInt = AssetDatabase.LoadAssetAtPath(propertyPath, typeof(IntVariable)) as IntVariable; if (assetAsInt != null) { IntVariables.Add(assetAsInt); continue; } FloatVariable assetAsFloat = AssetDatabase.LoadAssetAtPath(propertyPath, typeof(FloatVariable)) as FloatVariable; if (assetAsFloat != null) { FloatVariables.Add(assetAsFloat); continue; } Vector2Variable assetAsVector2 = AssetDatabase.LoadAssetAtPath(propertyPath, typeof(Vector2Variable)) as Vector2Variable; if (assetAsVector2 != null) { Vector2Variables.Add(assetAsVector2); continue; } Vector3Variable assetAsVector3 = AssetDatabase.LoadAssetAtPath(propertyPath, typeof(Vector3Variable)) as Vector3Variable; if (assetAsVector3 != null) { Vector3Variables.Add(assetAsVector3); continue; } QuaternionVariable assetAsQuaternion = AssetDatabase.LoadAssetAtPath(propertyPath, typeof(QuaternionVariable)) as QuaternionVariable; if (assetAsQuaternion != null) { QuaternionVariables.Add(assetAsQuaternion); continue; } TimerVariable assetAsTimer = AssetDatabase.LoadAssetAtPath(propertyPath, typeof(TimerVariable)) as TimerVariable; if (assetAsTimer != null) { TimerVariables.Add(assetAsTimer); continue; } FunctionVariable assetAsFunction = AssetDatabase.LoadAssetAtPath(propertyPath, typeof(TimerVariable)) as FunctionVariable; if (assetAsFunction != null) { FunctionVariables.Add(assetAsFunction); continue; } } Debug.Log($"{TriggerVariables.Count} Triggers" + $" | {BoolVariables.Count} Bools" + $" | {IntVariables.Count} Ints" + $" | {FloatVariables.Count} Floats" + $" | {Vector2Variables.Count} Vector2s" + $" | {Vector3Variables.Count} Vector3s" + $" | {QuaternionVariables.Count} Quaternions" + $" | {TimerVariables.Count} Timers" + $" | {FunctionVariables.Count} Functions"); }
public void SetValue(QuaternionVariable value) { Value = value.Value; }