예제 #1
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.KeypadEnter))
        {
            Book.Cur_Style = MyBook.TurningStyle.BottomRight;

            BJTweenPlugins.BJTweenAction be = this.gameObject.AddComponent <BJTweenPlugins.BJTweenAction>();
            be.AniAction = progress =>
            {
                var bpPos = BJTweenPlugins.BJBezier.GetBezierTPoint(Points, progress);
                Book.FollowPoint(bpPos);
            };
            be.Duration = 3f;
            be.Play();
        }
    }
예제 #2
0
        public static void FillAmountTo(this GameObject trans, float from, float to, float duration, EventHandler handle)
        {
            UITexture texture = trans.GetComponent <UITexture>();

            if (texture == null)
            {
                return;
            }
            EaseActionHelper.MyMethod Anitype = EaseActionHelper.MyMethod.Linear;
            BJTweenAction             baseAni = texture.gameObject.AddComponent <BJTweenAction>();

            baseAni.Duration  = duration;
            baseAni.AniAction = prog =>
            {
                texture.fillAmount = EaseActionHelper.Instance.EaseCalculate(Anitype, from, to, prog);
            };
            baseAni.AniEnded += handle;
            baseAni.Play();
        }