Example #1
0
        public void TweenerDemo()
        {
            //m_Target是一個Transform, UCL_Move對這個Transform的GameObject做移動的動作
            //生成UCL_Move的tweener 移動時間1.5秒 移動到目標位置m_Goal(也是一個Transform)

            UCL_Tweener tweener = m_Target.UCL_Move(1.5f, m_Goal);

            tweener.SetEase(EaseType.InBounce); //設定緩動函式(未設定時 預設是EaseType.Linear)

            tweener.Start();                    //開始執行tweener
        }
Example #2
0
        virtual public void StartDemo() {
            var tc = CreateTC();
            if(tc != null) {
                if(m_Tweener != null) {
                    m_Tweener.Kill(false);
                }
                m_Tweener = CreateTweener();

                //Add tween component to tweener
                //把tween元件加入tweener
                m_Tweener.AddComponent(tc);

                //start tweener
                //開始執行tweener
                m_Tweener.Start();
            }
        }