Exemple #1
0
        public static void DrawEase(EaseType ease_type, UCL_Texture2D texture)
        {
            var ease = EaseCreator.Get(ease_type);

            if (ease == null)
            {
                return;
            }
            UCL_EaseTexture tex = texture as UCL_EaseTexture;

            if (tex == null)
            {
                return;
            }
            tex.SetEase(ease);
        }
Exemple #2
0
        public void DrawEaseCurve(Core.TextureLib.UCL_Texture2D texture)
        {
            var ease = EaseCreator.Get(m_Type, m_Dir);

            if (ease == null)
            {
                return;
            }
            UCL_EaseTexture tex = texture as UCL_EaseTexture;

            if (tex == null)
            {
                return;
            }
            tex.SetEase(ease);
        }
Exemple #3
0
        private void Update()
        {
            if (f_LoopDir)
            {
                m_LoopTimer++;
                if (m_LoopTimer > m_LoopTime)
                {
                    m_LoopTimer = 0;
                    int val = (int)m_Dir;
                    val++;
                    if (val >= Enum.GetNames(typeof(EaseDir)).Length)
                    {
                        val = 0;
                    }
                    m_Dir = (EaseDir)val;
                }
            }
            m_Ease = EaseCreator.Get(m_Type, m_Dir);

            /*
             * if(!f_SetByEaseType) {
             *  m_EaseType = EaseCreator.GetType(m_Type, m_Dir);
             * } else {
             *  m_Type = EaseCreator.GetClass(m_EaseType);
             *  m_Dir = EaseCreator.GetDir(m_EaseType);
             * }
             */
            //m_Ease.SetDir(m_Dir);
            m_Texture.SetEase(m_Ease);
            Core.DebugLib.UCL_DebugOnGUI.Instance.CreateData().AddOnGUIAct(() => {
                GUILayout.BeginVertical();
                //string target_name = this.GetType().UnderlyingSystemType.Name.Replace("UCL_", "");
                GUILayout.Box("Min:" + m_Texture.m_Min.ToString("N2") + ",Max:" + m_Texture.m_Max.ToString("N2"), GUILayout.Width(m_TextureSize.x + 4));
                GUILayout.Box(m_Type.ToString() + " " + m_Ease.m_Dir.ToString(), GUILayout.Width(m_TextureSize.x + 4));
                //GUILayout.Box("Range:" + m_Texture.m_Range, GUILayout.Width(m_TextureSize.x + 4));
                //GUILayout.Box(name, GUILayout.Width(m_TextureSize.x + 4));
                GUILayout.Box(m_Texture.texture);
                GUILayout.EndVertical();
            });
        }
Exemple #4
0
        public void OpenEaseScript()
        {
            var ease = EaseCreator.Get(m_Type, m_Dir);

            if (ease == null)
            {
                return;
            }

            string sc_path = ease.GetScriptPath(Core.FileLib.EditorLib.GetLibFolderPath(Core.FileLib.LibName.UCL_TweenLib), ease.GetType().Name);

            Debug.Log("EaseScript:" + sc_path);
            var aObj = UCL.Core.EditorLib.AssetDatabaseMapper.LoadMainAssetAtPath(sc_path);

            if (aObj != null)
            {
                UCL.Core.EditorLib.SelectionMapper.activeObject = aObj;
            }
            else
            {
                Debug.LogWarning("EaseScript:" + sc_path + " ,Not Found!!");
            }
        }
Exemple #5
0
 virtual public EaseType GetEaseType()
 {
     return(EaseCreator.GetType(GetClass(), m_Dir));
 }