Exemple #1
0
    bool DrawToggleContent(TweenPRS _tw, TweenPRS.PRSType _type)
    {
        GUI.changed = false;

        string name = "";

        if (_type == TweenPRS.PRSType.Pos)
        {
            name = " TweenPosition";
        }
        else if (_type == TweenPRS.PRSType.Rot)
        {
            name = " TweenRotation";
        }
        else
        {
            name = " TweenScale";
        }

        bool enablePRS = _tw.isEnable(_type);

        enablePRS = EditorGUILayout.ToggleLeft(name, enablePRS);

        if (GUI.changed == true)
        {
            UIEditorTools.RegisterUndo("Tween Change", _tw);
            _tw.setEnable(_type, enablePRS);
            UnityEditor.EditorUtility.SetDirty(_tw);
        }

        return(enablePRS);
    }
Exemple #2
0
    private int panelIdx = 0;     // 0: category view 1: workingPanel View

    public void OnTapImage()
    {
        panelIdx = 0;

        m_tween.SetFrom(TweenPRS.PRSType.Pos, Vector3.zero);
        m_tween.SetTo(TweenPRS.PRSType.Pos, new Vector3(-(m_rectTransform.sizeDelta.x + 10), 0, 0));
        m_tween.setEnable(TweenPRS.PRSType.Pos, true);
        m_tween.PlayForward();

        m_workingPanel.gameObject.SetActive(true);
    }