public void DelayTimeAction(float delayTime, SkyAniCallBack skyAnicallBack)
    {
        Tweener tw = null;

        tw = runDelayTime(delayTime, delayTime);
        tw.SetTarget(delayTime);
        tw.OnComplete(skyAnicallBack.OnCompleteMethod);
    }
Пример #2
0
 // Use this for initialization
 void Start()
 {
     //		this.DOX ();
     SkyAniCallBack skyAniComplete = new SkyAniCallBack ();
     //		skyAniComplete.setCompleteMethod (()=>{Debug.Log ("EndTest  ");});
     //		SkyAnimator.moveFrom (button.gameObject,10,new Vector3(100,100,0),true,SkyAniDuration.Linear,skyAniComplete);
     SkyAnimator.moveBy (button.gameObject,10,new Vector3(100,100,0),true,SkyAniDuration.Linear,skyAniComplete);
 }
Пример #3
0
    public override void Init()
    {
        base.Init();
        mImage       = GetComponent <Image> ();
        mImage.color = colorMin;

        colorFirstComplete = new SkyAniCallBack();
        colorFirstComplete.SetCompleteMethod(() => { SkyAnimator.colorTo(mImage, PlayTime / 2f, colorMin, SkyAniDuration.Linear, PlayCallBack); });
    }
Пример #4
0
    // Use this for initialization
    void Start()
    {
//		this.DOX ();
        SkyAniCallBack skyAniComplete = new SkyAniCallBack();

//		skyAniComplete.setCompleteMethod (()=>{Debug.Log ("EndTest  ");});
//		SkyAnimator.moveFrom (button.gameObject,10,new Vector3(100,100,0),true,SkyAniDuration.Linear,skyAniComplete);
        SkyAnimator.moveBy(button.gameObject, 10, new Vector3(100, 100, 0), true, SkyAniDuration.Linear, skyAniComplete);
    }
Пример #5
0
    public override void Init()
    {
        base.Init ();
        mImage = GetComponent<Image> ();
        mImage.color = colorMin;

        colorFirstComplete = new SkyAniCallBack ();
        colorFirstComplete.SetCompleteMethod (()=>{ SkyAnimator.colorTo (mImage, PlayTime/2f, colorMin, SkyAniDuration.Linear, PlayCallBack);});
    }
Пример #6
0
 public static Tweener colorTo(Image obj, float time, Color target, SkyAniDuration vkDurType = SkyAniDuration.AnimationCurve, SkyAniCallBack completeObj = null)
 {
     Tweener tw = null;
     tw = obj.DOColor (target,time).SetEase ((Ease)vkDurType);
     if (completeObj != null) {
         tw.OnComplete (completeObj.OnCompleteMethod);
         tw.OnStart(completeObj.OnStartMethod);
         tw.OnStepComplete(completeObj.OnStepCompleteMethod);
     }
     return tw;
 }
Пример #7
0
 public static Tweener moveTo(GameObject obj, float time, Vector3 target, bool isLocal, SkyAniDuration vkDurType = SkyAniDuration.AnimationCurve, SkyAniCallBack completeObj = null)
 {
     Tweener tw = null;
     if (isLocal)
         tw = obj.transform.DOLocalMove (target, time, false).SetEase ((Ease)vkDurType);
     else
         tw = obj.transform.DOMove (target, time, false).SetEase ((Ease)vkDurType);
     if (completeObj != null) {
         tw.OnComplete (completeObj.OnCompleteMethod);
         tw.OnStart(completeObj.OnStartMethod);
         tw.OnStepComplete(completeObj.OnStepCompleteMethod);
     }
     return tw;
 }
Пример #8
0
 public override void Init()
 {
     base.Init ();
     RectTransform parentTransform = transform.parent.transform as RectTransform;
     parentHight = parentTransform.rect.height;
     parentWidth = parentTransform.rect.width;
     mImage = GetComponent<Image> ();
     mImage.color = colorMin;
     scalFirstComplete = new SkyAniCallBack ();
     scalFirstComplete.SetCompleteMethod (() => {
         SkyAnimator.scaleTo (gameObject, PlayTime / 2f, scaleMin, SkyAniDuration.Linear, null);});
     positionFirstComplete = new SkyAniCallBack ();
     positionFirstComplete.AddCompleteMethod (() => {
         SkyAnimator.moveTo (gameObject, PlayTime / 2f, SkyUtil.reletiveToLocal (positionMax, parentWidth, parentHight), true, PositionSkyAniDuration, PlayCallBack);});
     colorFirstComplete = new SkyAniCallBack ();
     colorFirstComplete.SetCompleteMethod (() => {
         SkyAnimator.colorTo (mImage, PlayTime / 2f, colorMin, SkyAniDuration.Linear, null);});
 }
Пример #9
0
 public virtual void Init()
 {
     ParentAction  = null;
     DelayCallBack = new SkyAniCallBack();
     DelayCallBack.SetCompleteMethod(() => {
         PlayLoop();
     });
     PlayCallBack = new SkyAniCallBack();
     PlayCallBack.SetCompleteMethod(() => {
         if (PlayCallBack.OnStepCompleteMethod != null)
         {
             PlayCallBack.OnStepCompleteMethod();
         }
         PlayNext();
         if (Loop)
         {
             Delay();
         }
     });
 }
Пример #10
0
    public virtual void Init()
    {
        animator = gameObject.GetComponent<Animator> ();

        MUIDisplayState = UIDisplayState.Disable;
        initPosition = this.transform.localPosition;
        OutAction = new SkyAniCallBack ();
        InAction = new SkyAniCallBack ();
        InAction.SetStartMethod (() => {
            MUIDisplayState = UIDisplayState.Showining;});
        InAction.SetCompleteMethod (() => {
            MUIDisplayState = UIDisplayState.Normal;});

        OutAction.SetStartMethod (() => {
            MUIDisplayState = UIDisplayState.Showouting;});
        OutAction.SetCompleteMethod (() => {
            MUIDisplayState = UIDisplayState.Disable;});

        InAction.AddCompleteMethod (TickUntilQuit);
    }
 public virtual void Init()
 {
     PositionSkyAniDuration = SkyAniDuration.Linear;
     ParentAction           = null;
     DelayCallBack          = new SkyAniCallBack();
     DelayCallBack.AddCompleteMethod(() => {
         PlayLoop();
     });
     PlayCallBack = new SkyAniCallBack();
     PlayCallBack.AddCompleteMethod(() => {
         if (PlayCallBack.OnStepCompleteMethod != null)
         {
             PlayCallBack.OnStepCompleteMethod();
         }
         PlayNext();
         if (Loop)
         {
             Delay();
         }
     });
 }
Пример #12
0
    public override void Init()
    {
        base.Init();
        RectTransform parentTransform = transform.parent.transform as RectTransform;

        parentHight       = parentTransform.rect.height;
        parentWidth       = parentTransform.rect.width;
        mImage            = GetComponent <Image> ();
        mImage.color      = colorMin;
        scalFirstComplete = new SkyAniCallBack();
        scalFirstComplete.SetCompleteMethod(() => {
            SkyAnimator.scaleTo(gameObject, PlayTime / 2f, scaleMin, SkyAniDuration.Linear, null);
        });
        positionFirstComplete = new SkyAniCallBack();
        positionFirstComplete.AddCompleteMethod(() => {
            SkyAnimator.moveTo(gameObject, PlayTime / 2f, SkyUtil.reletiveToLocal(positionMax, parentWidth, parentHight), true, PositionSkyAniDuration, PlayCallBack);
        });
        colorFirstComplete = new SkyAniCallBack();
        colorFirstComplete.SetCompleteMethod(() => {
            SkyAnimator.colorTo(mImage, PlayTime / 2f, colorMin, SkyAniDuration.Linear, null);
        });
    }
Пример #13
0
    public virtual void Init()
    {
        animator = gameObject.GetComponent <Animator> ();

        MUIDisplayState = UIDisplayState.Disable;
        initPosition    = this.transform.localPosition;
        OutAction       = new SkyAniCallBack();
        InAction        = new SkyAniCallBack();
        InAction.SetStartMethod(() => {
            MUIDisplayState = UIDisplayState.Showining;
        });
        InAction.SetCompleteMethod(() => {
            MUIDisplayState = UIDisplayState.Normal;
        });

        OutAction.SetStartMethod(() => {
            MUIDisplayState = UIDisplayState.Showouting;
        });
        OutAction.SetCompleteMethod(() => {
            MUIDisplayState = UIDisplayState.Disable;
        });

        InAction.AddCompleteMethod(TickUntilQuit);
    }
Пример #14
0
    public static Tweener scaleBy(GameObject obj, float time, Vector3 offsetScale, SkyAniDuration vkDurType = SkyAniDuration.AnimationCurve, SkyAniCallBack completeObj = null)
    {
        Tweener tw = null;

        tw = obj.transform.DOScale(offsetScale, time).SetEase((Ease)vkDurType).From().SetRelative(true);
        if (completeObj != null)
        {
            tw.OnComplete(completeObj.OnCompleteMethod);
            tw.OnStart(completeObj.OnStartMethod);
            tw.OnStepComplete(completeObj.OnStepCompleteMethod);
        }
        return(tw);
    }
Пример #15
0
    public static Tweener moveTo(GameObject obj, float time, Vector3 target, bool isLocal, SkyAniDuration vkDurType = SkyAniDuration.AnimationCurve, SkyAniCallBack completeObj = null)
    {
        Tweener tw = null;

        if (isLocal)
        {
            tw = obj.transform.DOLocalMove(target, time, false).SetEase((Ease)vkDurType);
        }
        else
        {
            tw = obj.transform.DOMove(target, time, false).SetEase((Ease)vkDurType);
        }
        if (completeObj != null)
        {
            tw.OnComplete(completeObj.OnCompleteMethod);
            tw.OnStart(completeObj.OnStartMethod);
            tw.OnStepComplete(completeObj.OnStepCompleteMethod);
        }
        return(tw);
    }
Пример #16
0
    public static Tweener moveToAlpha(GameObject obj, float time, float target, SkyAniDuration vkDurType = SkyAniDuration.AnimationCurve, SkyAniCallBack completeObj = null)
    {
        Tweener tw = null;

//		tw = startSkyAnimoteObj (obj, time, "alpha", target, vkDurType, completeObj);
//		DOTween.to
        return(tw);
    }
Пример #17
0
    public static Sequence moveToSequence(GameObject obj, List <float> times, List <Vector3> targets, bool isLocal, SkyAniDuration vkDurType = SkyAniDuration.AnimationCurve, SkyAniCallBack completeObj = null)
    {
        Sequence sequence = DOTween.Sequence();

        if (completeObj != null)
        {
            sequence.OnComplete(completeObj.OnCompleteMethod);
        }
        for (int i = 0; i < times.Count; i++)
        {
            sequence.Append(moveTo(obj, times [i], targets [i], true, vkDurType, null));
        }
        sequence.Play();
        return(sequence);
    }
Пример #18
0
    public static Tweener colorTo(Image obj, float time, Color target, SkyAniDuration vkDurType = SkyAniDuration.AnimationCurve, SkyAniCallBack completeObj = null)
    {
        Tweener tw = null;

        tw = obj.DOColor(target, time).SetEase((Ease)vkDurType);
        if (completeObj != null)
        {
            tw.OnComplete(completeObj.OnCompleteMethod);
            tw.OnStart(completeObj.OnStartMethod);
            tw.OnStepComplete(completeObj.OnStepCompleteMethod);
        }
        return(tw);
    }
Пример #19
0
 public static Tweener moveToAlpha(GameObject obj, float time, float target, SkyAniDuration vkDurType = SkyAniDuration.AnimationCurve, SkyAniCallBack completeObj = null)
 {
     Tweener tw = null;
     //		tw = startSkyAnimoteObj (obj, time, "alpha", target, vkDurType, completeObj);
     //		DOTween.to
     return tw;
 }
 public virtual void Init()
 {
     ParentAction = null;
     DelayCallBack = new SkyAniCallBack ();
     DelayCallBack.SetCompleteMethod (() => {
         PlayLoop ();});
     PlayCallBack = new SkyAniCallBack ();
     PlayCallBack.SetCompleteMethod (() => {
         if (PlayCallBack.OnStepCompleteMethod != null) {
             PlayCallBack.OnStepCompleteMethod ();
         }
         PlayNext ();
         if (Loop)
             Delay ();
     });
 }
Пример #21
0
 public static Sequence moveToSequence(GameObject obj, List<float> times, List<Vector3> targets, bool isLocal, SkyAniDuration vkDurType = SkyAniDuration.AnimationCurve, SkyAniCallBack completeObj = null)
 {
     Sequence sequence = DOTween.Sequence();
     if (completeObj != null) {
         sequence.OnComplete (completeObj.OnCompleteMethod);
     }
     for (int i=0; i<times.Count; i++) {
         sequence.Append (moveTo (obj, times [i], targets [i], true, vkDurType, null));
     }
     sequence.Play ();
     return sequence;
 }
Пример #22
0
 public static Tweener scaleTo(GameObject obj, float time, Vector3 scale, SkyAniDuration vkDurType = SkyAniDuration.AnimationCurve, SkyAniCallBack completeObj = null)
 {
     Tweener tw = null;
     tw = obj.transform.DOScale (scale, time).SetEase ((Ease)vkDurType);
     if (completeObj != null) {
         tw.OnComplete (completeObj.OnCompleteMethod);
         tw.OnStart(completeObj.OnStartMethod);
         tw.OnStepComplete(completeObj.OnStepCompleteMethod);
     }
     return tw;
 }