Пример #1
0
    // Token: 0x0600062E RID: 1582 RVA: 0x00035D38 File Offset: 0x00033F38
    public static TweenWidth Begin(UIWidget widget, float duration, int width)
    {
        TweenWidth tweenWidth = UITweener.Begin <TweenWidth>(widget.gameObject, duration, 0f);

        tweenWidth.from = widget.width;
        tweenWidth.to   = width;
        if (duration <= 0f)
        {
            tweenWidth.Sample(1f, true);
            tweenWidth.enabled = false;
        }
        return(tweenWidth);
    }
Пример #2
0
    /// <summary>
    /// Start the tweening operation.
    /// </summary>

    static public TweenWidth Begin(RectTransform widget, float duration, int width)
    {
        TweenWidth comp = UITweener.Begin <TweenWidth>(widget.gameObject, duration);

        comp.from = widget.sizeDelta.x;
        comp.to   = width;

        if (duration <= 0f)
        {
            comp.Sample(1f, true);
            comp.enabled = false;
        }
        return(comp);
    }
Пример #3
0
    public static TweenWidth Begin(UIWidget widget, float duration, int width)
    {
        //IL_0001: Unknown result type (might be due to invalid IL or missing references)
        //IL_0008: Expected O, but got Unknown
        TweenWidth tweenWidth = UITweener.Begin <TweenWidth>(widget.get_gameObject(), duration, true);

        tweenWidth.from = widget.width;
        tweenWidth.to   = width;
        if (duration <= 0f)
        {
            tweenWidth.Sample(1f, true);
            tweenWidth.set_enabled(false);
        }
        return(tweenWidth);
    }
Пример #4
0
    public override void OnInspectorGUI()
    {
        GUILayout.Space(6f);
        NGUIEditorTools.SetLabelWidth(120f);

        TweenWidth tw = target as TweenWidth;

        GUI.changed = false;

        int  from  = EditorGUILayout.IntField("From", tw.from);
        int  to    = EditorGUILayout.IntField("To", tw.to);
        bool table = EditorGUILayout.Toggle("Update Table", tw.updateTable);

        if (from < 0)
        {
            from = 0;
        }
        if (to < 0)
        {
            to = 0;
        }

        if (GUI.changed)
        {
            NGUIEditorTools.RegisterUndo("Tween Change", tw);
            tw.from        = from;
            tw.to          = to;
            tw.updateTable = table;
            if (preview)
            {
                tw.Sample(tw.tweenFactor, false);
            }
            NGUITools.SetDirty(tw);
        }

        DrawCommonProperties();
    }