/// <summary> /// 寮濮嬭ˉ闂存搷浣浱 /// </summary> static public CustomTweenVolume Begin(GameObject go, float duration, float targetVolume) { CustomTweenVolume comp = CustomUITweener.Begin <CustomTweenVolume>(go, duration); comp.from = comp.value; comp.to = targetVolume; return(comp); }
public override void OnInspectorGUI() { GUILayout.Space(6f); CustomUITweenEditorTools.SetLabelWidth(120f); CustomTweenVolume tw = target as CustomTweenVolume; GUI.changed = false; float from = EditorGUILayout.Slider("From", tw.from, 0f, 1f); float to = EditorGUILayout.Slider("To", tw.to, 0f, 1f); if (GUI.changed) { CustomUITweenEditorTools.RegisterUndo("Tween Change", tw); tw.from = from; tw.to = to; CustomUITweenTools.SetDirty(tw); } DrawCommonProperties(); }