override public void ShowGUI(List <ActionParameter> parameters) { tintMapMethod = (TintMapMethod)EditorGUILayout.EnumPopup("Change to make:", tintMapMethod); isPlayer = EditorGUILayout.Toggle("Affect Player?", isPlayer); if (!isPlayer) { followTintMapParameterID = Action.ChooseParameterGUI("FollowTintMap:", parameters, followTintMapParameterID, ParameterType.GameObject); if (followTintMapParameterID >= 0) { followTintMapConstantID = 0; followTintMap = null; } else { followTintMap = (FollowTintMap)EditorGUILayout.ObjectField("FollowTintMap:", followTintMap, typeof(FollowTintMap), true); followTintMapConstantID = FieldToID <FollowTintMap> (followTintMap, followTintMapConstantID); followTintMap = IDToField <FollowTintMap> (followTintMap, followTintMapConstantID, false); } } if (tintMapMethod == TintMapMethod.ChangeTintMap) { followDefault = EditorGUILayout.Toggle("Use scene's default TintMap?", followDefault); if (!followDefault) { newTintMapParameterID = Action.ChooseParameterGUI("New TintMap:", parameters, newTintMapParameterID, ParameterType.GameObject); if (newTintMapParameterID >= 0) { newTintMapConstantID = 0; followTintMap = null; } else { newTintMap = (TintMap)EditorGUILayout.ObjectField("New TintMap:", newTintMap, typeof(TintMap), true); newTintMapConstantID = FieldToID <TintMap> (newTintMap, newTintMapConstantID); newTintMap = IDToField <TintMap> (newTintMap, newTintMapConstantID, false); } } } else if (tintMapMethod == TintMapMethod.ChangeIntensity) { newIntensity = EditorGUILayout.Slider("New intensity:", newIntensity, 0f, 1f); isInstant = EditorGUILayout.Toggle("Change instantly?", isInstant); if (!isInstant) { timeToChange = EditorGUILayout.FloatField("Time to change (s):", timeToChange); if (timeToChange > 0f) { willWait = EditorGUILayout.Toggle("Wait until finish?", willWait); } } } AfterRunningOption(); }
public override void ShowGUI(List<ActionParameter> parameters) { tintMapMethod = (TintMapMethod) EditorGUILayout.EnumPopup ("Change to make:", tintMapMethod); isPlayer = EditorGUILayout.Toggle ("Affect Player?", isPlayer); if (!isPlayer) { followTintMapParameterID = Action.ChooseParameterGUI ("FollowTintMap:", parameters, followTintMapParameterID, ParameterType.GameObject); if (followTintMapParameterID >= 0) { followTintMapConstantID = 0; followTintMap = null; } else { followTintMap = (FollowTintMap) EditorGUILayout.ObjectField ("FollowTintMap:", followTintMap, typeof (FollowTintMap), true); followTintMapConstantID = FieldToID <FollowTintMap> (followTintMap, followTintMapConstantID); followTintMap = IDToField <FollowTintMap> (followTintMap, followTintMapConstantID, false); } } if (tintMapMethod == TintMapMethod.ChangeTintMap) { followDefault = EditorGUILayout.Toggle ("Use scene's default TintMap?", followDefault); if (!followDefault) { newTintMapParameterID = Action.ChooseParameterGUI ("New TintMap:", parameters, newTintMapParameterID, ParameterType.GameObject); if (newTintMapParameterID >= 0) { newTintMapConstantID = 0; followTintMap = null; } else { newTintMap = (TintMap) EditorGUILayout.ObjectField ("New TintMap:", newTintMap, typeof (TintMap), true); newTintMapConstantID = FieldToID <TintMap> (newTintMap, newTintMapConstantID); newTintMap = IDToField <TintMap> (newTintMap, newTintMapConstantID, false); } } } else if (tintMapMethod == TintMapMethod.ChangeIntensity) { newIntensity = EditorGUILayout.Slider ("New intensity:", newIntensity, 0f, 1f); isInstant = EditorGUILayout.Toggle ("Change instantly?", isInstant); if (!isInstant) { timeToChange = EditorGUILayout.FloatField ("Time to change (s):", timeToChange); if (timeToChange > 0f) { willWait = EditorGUILayout.Toggle ("Wait until finish?", willWait); } } } AfterRunningOption (); }