Ejemplo n.º 1
0
    /// <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);
    }
Ejemplo n.º 2
0
    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();
    }