Esempio n. 1
0
    private void Show()
    {
        GoodsItemVO vo = currSelectedVO;

        //todo:根据数据初始化整个详情
        SetName(vo.name);
        SetOwn(vo.own);
        SetDetails(vo.description, vo.extraDescription);
        SetCost(vo.totalcost, vo.cout, vo.goodsCostType);
        Convert();

        if (temp == null)
        {
            this.mTrans.localScale = new Vector3(0.1f, 0.1f, 0.1f);
            HOTween.Init();
            parms = new TweenParms();
            parms.Prop("localScale", new Vector3(1f, 1f, 1f));
            parms.Ease(EaseType.EaseOutBack);
            parms.Delay(0.1f);
            parms.AutoKill(false);
            temp       = HOTween.To(this.mTrans, 0.2f, parms);
            temp.intId = 1;
        }
        temp.PlayForward();
    }
Esempio n. 2
0
    //creates a new HOTween tween which moves us to the next waypoint
    //(defined by passed arguments)
    internal void CreateTween()
    {
        //prepare HOTween's parameters, you can look them up here
        //http://www.holoville.com/hotween/documentation.html
        ////////////////////////////////////////////////////////////

        //create new HOTween plugin for curved paths
        //pass in array of Vector3 waypoint positions, relative = true
        plugPath = new PlugVector3Path(wpPos, true, pathtype);

        //orients the tween target along the path
        //constrains this game object on one axis
        if (orientToPath)
        {
            plugPath.OrientToPath();
        }

        //create TweenParms for storing HOTween's parameters
        tParms = new TweenParms();
        //sets the path plugin as tween position property
        tParms.Prop("position", plugPath);
        tParms.AutoKill(true);
        //use speed based tween with linear easing
        tParms.SpeedBased();
        tParms.Ease(EaseType.Linear);
        tParms.OnComplete(OnPathComplete);

        //create a new tween, move this gameobject with given arguments
        tween = HOTween.To(transform, maxSpeed, tParms);
    }
Esempio n. 3
0
    public override void FireEvent()
    {
        if (tweener != null)
        {
            return;
        }

        TweenParms parms = new TweenParms();

        parms.Prop(fieldName, GetTargetValue());
        parms.Ease(easeType);
        parms.AutoKill(false);

        tweener = HOTween.To(TargetComponent, Duration, parms);
    }
Esempio n. 4
0
    private void SetRefreshChoiceOpen()
    {
        refreshT.gameObject.SetActive(true);

        if (parms == null)
        {
            refreshT.localScale = new Vector3(0.1f, 0.1f, 0.1f);
            parms = new TweenParms();
            parms.Prop("localScale", new Vector3(1f, 1f, 1f));
            parms.Ease(EaseType.EaseOutBack);
            parms.Delay(0.1f);
            parms.AutoKill(false);
            temp = HOTween.To(refreshT, 0.2f, parms);
        }
        temp.PlayForward();
    }
Esempio n. 5
0
    private void Show()
    {
        //todo:根据数据初始化整个详情
        if (currSelectedVO != null)
        {
            TitleText.text  = currSelectedVO.title;
            DetailText.text = currSelectedVO.content;
        }
        //Convert();

        if (temp == null)
        {
            this.mTrans.localScale = new Vector3(0.1f, 0.1f, 0.1f);
            HOTween.Init();
            parms = new TweenParms();
            parms.Prop("localScale", new Vector3(1f, 1f, 1f));
            parms.Ease(EaseType.EaseOutBack);
            parms.Delay(0.1f);
            parms.AutoKill(false);
            temp       = HOTween.To(this.mTrans, 0.2f, parms);
            temp.intId = 1;
        }
        temp.PlayForward();
    }
Esempio n. 6
0
    //creates a new HOTween tween which moves us to the next waypoint
    //(defined by passed arguments)
    internal void CreateTween()
    {
        //play walk animation if set
        PlayWalk();

        //prepare HOTween's parameters, you can look them up here
        //http://www.holoville.com/hotween/documentation.html
        ////////////////////////////////////////////////////////////

        //create new HOTween plugin for curved paths
        //pass in array of Vector3 waypoint positions, relative = true
        plugPath = new PlugVector3Path(wpPos, true, pathtype);

        //orients the tween target along the path
        //constrains this game object on one axis
        if (orientToPath || lockAxis != Axis.None)
        {
            plugPath.OrientToPath(lookAhead, lockAxis);
        }

        //lock position axis
        if (lockPosition != Axis.None)
        {
            plugPath.LockPosition(lockPosition);
        }

        //create a smooth path if closePath was true
        if (closePath)
        {
            plugPath.ClosePath(true);
        }

        //create TweenParms for storing HOTween's parameters
        tParms = new TweenParms();
        //sets the path plugin as tween position property
        if (local)
        {
            tParms.Prop("localPosition", plugPath);
        }
        else
        {
            tParms.Prop("position", plugPath);
        }
        //additional tween parameters for partial tweens
        tParms.AutoKill(false);
        tParms.Pause(true);
        tParms.Loops(1);

        //differ between TimeValue like mentioned above at enum TimeValue
        //use speed with linear easing
        if (timeValue == TimeValue.speed)
        {
            tParms.SpeedBased();
            tParms.Ease(EaseType.Linear);
        }
        else
        {
            //use time in seconds and the chosen easetype
            tParms.Ease(easetype);
        }

        //create a new tween, move this gameobject with given arguments
        tween = HOTween.To(transform, originSpeed, tParms);

        //continue new tween with adjusted speed if it was changed before
        if (originSpeed != speed)
        {
            ChangeSpeed(speed);
        }
    }
        //creates a new HOTween tween with give arguments that moves along the path
        private void CreateTween()
        {
            //prepare HOTween's parameters, you can look them up here
            //http://www.holoville.com/hotween/documentation.html

            //create new plugin for curved paths
            //pass in array of Vector3 waypoint positions, relative = true
            plugPath = new PlugVector3Path(waypoints, true, pathType);

            //orients the tween target along the path
            if (orientToPath)
            {
                plugPath.OrientToPath(lookAhead, lockAxis);
            }

            //lock position axis, if set
            if (lockPosition != Holoville.HOTween.Axis.None)
            {
                plugPath.LockPosition(lockPosition);
            }

            //create a closed loop, if set
            if (loopType == LoopType.loop && closeLoop)
            {
                plugPath.ClosePath(true);
            }

            //create TweenParms for storing HOTween's parameters
            tParms = new TweenParms();
            //sets the path plugin as tween position property
            tParms.Prop("position", plugPath);

            //additional tween parameters
            tParms.AutoKill(false);
            tParms.Loops(1);
            if (!moveToPath)
            {
                tParms.OnComplete(ReachedEnd);
            }

            //differ between TimeValue, use speed with linear easing
            //or time based tweening with an animation easetype
            if (timeValue == TimeValue.speed)
            {
                tParms.SpeedBased();
                tParms.Ease(EaseType.Linear);
            }
            else
            {
                //use time in seconds and the chosen easetype
                if (easeType == Holoville.HOTween.EaseType.AnimationCurve)
                {
                    tParms.Ease(animEaseType);
                }
                else
                {
                    tParms.Ease(easeType);
                }
            }

            //finally create the tween
            tween = HOTween.To(transform, originSpeed, tParms);

            //continue new tween with adjusted speed if it was changed before
            if (originSpeed != speed)
            {
                ChangeSpeed(speed);
            }
        }