コード例 #1
0
    public static RunFrameAnimation Do(GameObject sub, float dur, float[] delay, EZAnimation.CompletionDelegate startDel, EZAnimation.CompletionDelegate del)
    {
        RunFrameAnimation runFrameAnimation = (RunFrameAnimation)EZAnimator.instance.GetAnimation(EZAnimation.ANIM_TYPE.FrameAnimation);

        runFrameAnimation.Start(sub, dur, delay, startDel, del);
        return(runFrameAnimation);
    }
コード例 #2
0
    public static Crash Do(GameObject sub, Vector3 mag, float dur, float delay, EZAnimation.CompletionDelegate startDel, EZAnimation.CompletionDelegate del)
    {
        Crash crash = (Crash)EZAnimator.instance.GetAnimation(EZAnimation.ANIM_TYPE.Crash);

        crash.Start(sub, mag, dur, delay, startDel, del);
        return(crash);
    }
コード例 #3
0
 public void Start(GameObject sub, Vector3 mag, float dur, float delay, EZAnimation.CompletionDelegate startDel, EZAnimation.CompletionDelegate del)
 {
     if (sub == null)
     {
         return;
     }
     this.Start(sub, sub.transform.localEulerAngles, mag, dur, delay, startDel, del);
 }
コード例 #4
0
 public void ResetDefaults()
 {
     this.pingPong          = true;
     this.restartOnRepeat   = false;
     this.data              = null;
     this.completedDelegate = null;
     this.startDelegate     = null;
 }
コード例 #5
0
    //! fade out all object
    private void StartDisappear()
    {
        EZAnimation.CompletionDelegate dele = delegate(EZAnimation ani){
            if (mPlayDoneEvent != null)
            {
                try{
                    mPlayDoneEvent();
                }catch (System.Exception e) {
                    Debug.LogError(e.GetType().Name + " " + e.Message);
                }
            }

            try{
                NextEffectFont();
            }catch (System.Exception e) {
                Debug.LogError(e.Message + "\n" + e.StackTrace);
            }
        };

        if (mCurrType == EffectType.TouXiChengGong)
        {
            //  TouXiChengGong NewEffectFont must move to battle buffer position
            //
            GUIBattle battle = Globals.Instance.MGUIManager.GetGUIWindow <GUIBattle>();
            if (battle != null && battle.GetBufferInfoRoot() != null)
            {
                UIButton[] btns = battle.GetBufferInfoRoot().GetComponentsInChildren <UIButton>();
                foreach (UIButton btn in btns)
                {
                    if (btn.Data is BuffData)
                    {
                        // get the buffData
                        //
                        BuffData TouXiBuf = (BuffData)btn.Data;

                        if (TouXiBuf.ID == 1429999999)                         // is right touxiBuffer
                        {
                            iTween.MoveTo(gameObject, btn.transform.position, DisappearTime);

                            EZAnimation.CompletionDelegate backDele = dele;
                            iTween.ScaleTo(gameObject, new Vector3(0, 0, 1), DisappearTime);
                            break;
                        }
                    }
                }
            }
        }

        SpriteRoot[] tSprite = GetComponentsInChildren <SpriteRoot>();

        for (int i = 0; i < tSprite.Length; i++)
        {
            FadeSpriteAlpha tSpriteFade = FadeSpriteAlpha.Do(tSprite[i], EZAnimation.ANIM_MODE.To, Color.clear, EZAnimation.linear, DisappearTime, FontShakeTime, null,
                                                             i == tSprite.Length - 1?dele:null);
        }
    }
コード例 #6
0
 public void Start(GameObject sub, float dur, float[] delay, EZAnimation.CompletionDelegate startDel, EZAnimation.CompletionDelegate del)
 {
     if (sub == null)
     {
         return;
     }
     this.subject           = sub;
     this.duration          = dur;
     this.frameWait         = delay;
     this.completedDelegate = del;
     this.startDelegate     = startDel;
     this.m_wait            = this.frameWait[0];
     base.StartCommon();
     EZAnimator.instance.AddAnimation(this);
 }
コード例 #7
0
    public static PunchRotation Do(GameObject sub, Vector3 mag, float dur, float delay, EZAnimation.CompletionDelegate startDel, EZAnimation.CompletionDelegate del)
    {
        PunchRotation punchRotation = (PunchRotation)EZAnimator.instance.GetAnimation(EZAnimation.ANIM_TYPE.PunchRotation);

        punchRotation.Start(sub, mag, dur, delay, startDel, del);
        return(punchRotation);
    }
コード例 #8
0
 public void Clear()
 {
     this.completedDelegate = null;
     this.startDelegate     = null;
     this.data = null;
 }
コード例 #9
0
    public static TuneAudio Do(AudioSource audio, EZAnimation.ANIM_MODE mode, float dest, EZAnimation.Interpolator interp, float dur, float delay, EZAnimation.CompletionDelegate startDel, EZAnimation.CompletionDelegate del)
    {
        TuneAudio tuneAudio = (TuneAudio)EZAnimator.instance.GetAnimation(EZAnimation.ANIM_TYPE.TuneAudio);

        tuneAudio.Start(audio, mode, dest, interp, dur, delay, startDel, del);
        return(tuneAudio);
    }
コード例 #10
0
 public void Start(GameObject sub, EZAnimation.ANIM_MODE mode, Vector3 begin, Vector3 dest, EZAnimation.Interpolator interp, float dur, float delay, EZAnimation.CompletionDelegate startDel, EZAnimation.CompletionDelegate del)
 {
     this.subject  = sub;
     this.subTrans = this.subject.transform;
     this.start    = begin;
     this.m_mode   = mode;
     if (mode == EZAnimation.ANIM_MODE.By)
     {
         this.delta = dest;
     }
     else
     {
         this.delta = new Vector3(dest.x - this.start.x, dest.y - this.start.y, dest.z - this.start.z);
     }
     this.end               = this.start + this.delta;
     this.interpolator      = interp;
     this.duration          = dur;
     this.m_wait            = delay;
     this.completedDelegate = del;
     this.startDelegate     = startDel;
     base.StartCommon();
     if (mode == EZAnimation.ANIM_MODE.FromTo && delay == 0f)
     {
         this.subTrans.localEulerAngles = this.start;
     }
     EZAnimator.instance.AddAnimation(this);
 }
コード例 #11
0
    public static FadeMaterial Do(Material material, EZAnimation.ANIM_MODE mode, Color dest, EZAnimation.Interpolator interp, float dur, float delay, EZAnimation.CompletionDelegate startDel, EZAnimation.CompletionDelegate del)
    {
        FadeMaterial fadeMaterial = (FadeMaterial)EZAnimator.instance.GetAnimation(EZAnimation.ANIM_TYPE.FadeMaterial);

        fadeMaterial.Start(material, mode, dest, interp, dur, delay, startDel, del);
        return(fadeMaterial);
    }
コード例 #12
0
 public void Start(SpriteRoot sprt, EZAnimation.ANIM_MODE mode, Color begin, Color dest, EZAnimation.Interpolator interp, float dur, float delay, EZAnimation.CompletionDelegate startDel, EZAnimation.CompletionDelegate del)
 {
     this.sprite = sprt;
     this.start  = begin;
     this.m_mode = mode;
     if (mode == EZAnimation.ANIM_MODE.By)
     {
         this.delta = dest;
     }
     else
     {
         this.delta = new Color(dest.r - this.start.r, dest.g - this.start.g, dest.b - this.start.b, dest.a - this.start.a);
     }
     this.end               = this.start + this.delta;
     this.interpolator      = interp;
     this.duration          = dur;
     this.m_wait            = delay;
     this.completedDelegate = del;
     this.startDelegate     = startDel;
     base.StartCommon();
     if (mode == EZAnimation.ANIM_MODE.FromTo && delay == 0f)
     {
         this.sprite.SetColor(this.start);
     }
     EZAnimator.instance.AddAnimation(this);
 }
コード例 #13
0
 public void Start(AudioSource audio, EZAnimation.ANIM_MODE mode, float dest, EZAnimation.Interpolator interp, float dur, float delay, EZAnimation.CompletionDelegate startDel, EZAnimation.CompletionDelegate del)
 {
     this.Start(audio, mode, audio.pitch, dest, interp, dur, delay, startDel, del);
 }
コード例 #14
0
    public static ShakeRotation Do(GameObject sub, Vector3 mag, float oscill, float dur, float delay, EZAnimation.CompletionDelegate startDel, EZAnimation.CompletionDelegate del)
    {
        ShakeRotation shakeRotation = (ShakeRotation)EZAnimator.instance.GetAnimation(EZAnimation.ANIM_TYPE.ShakeRotation);

        shakeRotation.Start(sub, mag, oscill, dur, delay, startDel, del);
        return(shakeRotation);
    }
コード例 #15
0
    public static SmoothCrash Do(GameObject sub, Vector3 mag, Vector3 oscill, float dur, float delay, EZAnimation.CompletionDelegate startDel, EZAnimation.CompletionDelegate del)
    {
        SmoothCrash smoothCrash = (SmoothCrash)EZAnimator.instance.GetAnimation(EZAnimation.ANIM_TYPE.SmoothCrash);

        smoothCrash.Start(sub, mag, oscill, dur, delay, startDel, del);
        return(smoothCrash);
    }
コード例 #16
0
    public static PunchScale Do(GameObject sub, Vector3 mag, float width, float height, float dur, float delay, EZAnimation.CompletionDelegate startDel, EZAnimation.CompletionDelegate del)
    {
        PunchScale punchScale = (PunchScale)EZAnimator.instance.GetAnimation(EZAnimation.ANIM_TYPE.PunchScale);

        punchScale.Start(sub, mag, width, height, dur, delay, startDel, del);
        return(punchScale);
    }
コード例 #17
0
 public void Start(GameObject sub, Vector3 mag, float width, float height, float dur, float delay, EZAnimation.CompletionDelegate startDel, EZAnimation.CompletionDelegate del)
 {
     if (sub == null)
     {
         return;
     }
     this.Start(sub, sub.transform.localScale, mag, width, height, dur, delay, startDel, del);
 }
コード例 #18
0
 public void Start(GameObject sub, EZAnimation.ANIM_MODE mode, bool increase, Vector3 begin, Vector3 dest, Vector3 beginPos, Vector3 destPos, EZAnimation.Interpolator interp, float dur, float delay, EZAnimation.CompletionDelegate startDel, EZAnimation.CompletionDelegate del)
 {
     this.movePos  = true;
     this.subject  = sub;
     this.subTrans = this.subject.transform;
     this.start    = begin;
     this.m_mode   = mode;
     if (mode == EZAnimation.ANIM_MODE.By)
     {
         this.delta    = Vector3.Scale(this.start, dest) - this.start;
         this.deltaPos = Vector3.Scale(this.start, dest) - this.start;
         this.startPos = beginPos;
         this.deltaPos = destPos - this.startPos;
     }
     else
     {
         this.delta = dest - this.start;
         if (increase)
         {
             this.startPos = Vector3.zero;
         }
         else
         {
             this.startPos = this.subject.transform.localPosition;
         }
         this.deltaPos = destPos - beginPos;
     }
     this.end               = this.start + this.delta;
     this.interpolator      = interp;
     this.duration          = dur;
     this.m_wait            = delay;
     this.completedDelegate = del;
     this.startDelegate     = startDel;
     base.StartCommon();
     if (mode == EZAnimation.ANIM_MODE.FromTo && delay == 0f)
     {
         this.subTrans.localScale = this.start;
     }
     EZAnimator.instance.AddAnimation(this);
 }
コード例 #19
0
    public static AnimateScale Do(GameObject sub, EZAnimation.ANIM_MODE mode, bool increase, Vector3 begin, Vector3 dest, Vector3 beginPos, Vector3 destPos, EZAnimation.Interpolator interp, float dur, float delay, EZAnimation.CompletionDelegate startDel, EZAnimation.CompletionDelegate del)
    {
        AnimateScale animateScale = (AnimateScale)EZAnimator.instance.GetAnimation(EZAnimation.ANIM_TYPE.Scale);

        animateScale.Start(sub, mode, increase, begin, dest, beginPos, destPos, interp, dur, delay, startDel, del);
        return(animateScale);
    }
コード例 #20
0
    public static AnimateRotation Do(GameObject sub, EZAnimation.ANIM_MODE mode, Vector3 dest, EZAnimation.Interpolator interp, float dur, float delay, EZAnimation.CompletionDelegate startDel, EZAnimation.CompletionDelegate del)
    {
        AnimateRotation animateRotation = (AnimateRotation)EZAnimator.instance.GetAnimation(EZAnimation.ANIM_TYPE.Rotate);

        animateRotation.Start(sub, mode, dest, interp, dur, delay, startDel, del);
        return(animateRotation);
    }
コード例 #21
0
 public void Start(AudioSource sub, EZAnimation.ANIM_MODE mode, float begin, float dest, EZAnimation.Interpolator interp, float dur, float delay, EZAnimation.CompletionDelegate startDel, EZAnimation.CompletionDelegate del)
 {
     this.subject = sub;
     this.start   = begin;
     this.m_mode  = mode;
     if (mode == EZAnimation.ANIM_MODE.By)
     {
         this.delta = dest;
     }
     else
     {
         this.delta = dest - this.start;
     }
     this.end               = this.start + this.delta;
     this.interpolator      = interp;
     this.duration          = dur;
     this.m_wait            = delay;
     this.completedDelegate = del;
     this.startDelegate     = startDel;
     base.StartCommon();
     EZAnimator.instance.Stop(this.subject, this.type, mode == EZAnimation.ANIM_MODE.By);
     if (mode == EZAnimation.ANIM_MODE.FromTo && delay == 0f)
     {
         this.subject.pitch = this.start;
     }
     EZAnimator.instance.AddAnimation(this);
 }
コード例 #22
0
    public static FadeAudio Do(AudioSource audio, EZAnimation.ANIM_MODE mode, float begin, float dest, EZAnimation.Interpolator interp, float dur, float delay, EZAnimation.CompletionDelegate startDel, EZAnimation.CompletionDelegate del)
    {
        FadeAudio fadeAudio = (FadeAudio)EZAnimator.instance.GetAnimation(EZAnimation.ANIM_TYPE.FadeAudio);

        fadeAudio.Start(audio, mode, begin, dest, interp, dur, delay, startDel, del);
        return(fadeAudio);
    }
コード例 #23
0
 public void Start(SpriteRoot sprt, EZAnimation.ANIM_MODE mode, Color dest, EZAnimation.Interpolator interp, float dur, float delay, EZAnimation.CompletionDelegate startDel, EZAnimation.CompletionDelegate del)
 {
     this.Start(sprt, mode, sprt.color, dest, interp, dur, delay, startDel, del);
 }
コード例 #24
0
 public void Start(GameObject sub, string clip, float blend, float dur, float delay, EZAnimation.CompletionDelegate startDel, EZAnimation.CompletionDelegate del)
 {
     if (sub == null)
     {
         return;
     }
     if (sub.animation == null)
     {
         return;
     }
     this.playedYet         = false;
     this.subject           = sub;
     this.m_clip            = clip;
     this.blending          = blend;
     this.duration          = dur;
     this.m_wait            = delay;
     this.completedDelegate = del;
     this.startDelegate     = startDel;
     base.StartCommon();
     EZAnimator.instance.AddAnimation(this);
 }
コード例 #25
0
    public static FadeSprite Do(SpriteRoot sprt, EZAnimation.ANIM_MODE mode, Color dest, EZAnimation.Interpolator interp, float dur, float delay, EZAnimation.CompletionDelegate startDel, EZAnimation.CompletionDelegate del)
    {
        FadeSprite fadeSprite = (FadeSprite)EZAnimator.instance.GetAnimation(EZAnimation.ANIM_TYPE.FadeSprite);

        fadeSprite.Start(sprt, mode, dest, interp, dur, delay, startDel, del);
        return(fadeSprite);
    }
コード例 #26
0
 public void Start(Material material, EZAnimation.ANIM_MODE mode, Color dest, EZAnimation.Interpolator interp, float dur, float delay, EZAnimation.CompletionDelegate startDel, EZAnimation.CompletionDelegate del)
 {
     this.Start(material, mode, material.color, dest, interp, dur, delay, startDel, del);
 }
コード例 #27
0
 public void Start(GameObject sub, Vector3 begin, Vector3 mag, float oscill, float dur, float delay, EZAnimation.CompletionDelegate startDel, EZAnimation.CompletionDelegate del)
 {
     this.subject  = sub;
     this.subTrans = this.subject.transform;
     this.start    = begin;
     this.subTrans.localEulerAngles = this.start;
     this.magnitude         = mag;
     this.oscillations      = oscill;
     this.m_mode            = EZAnimation.ANIM_MODE.By;
     this.duration          = dur;
     this.m_wait            = delay;
     this.completedDelegate = del;
     this.startDelegate     = startDel;
     base.StartCommon();
     EZAnimator.instance.AddAnimation(this);
 }
コード例 #28
0
 public void Start(GameObject sub, EZAnimation.ANIM_MODE mode, Vector3 dest, EZAnimation.Interpolator interp, float dur, float delay, EZAnimation.CompletionDelegate startDel, EZAnimation.CompletionDelegate del)
 {
     if (sub == null)
     {
         return;
     }
     this.Start(sub, mode, sub.transform.localEulerAngles, dest, interp, dur, delay, startDel, del);
 }
コード例 #29
0
 public void Start(GameObject sub, Vector3 begin, Vector3 mag, Vector3 oscill, float dur, float delay, EZAnimation.CompletionDelegate startDel, EZAnimation.CompletionDelegate del)
 {
     this.subject  = sub;
     this.subTrans = this.subject.transform;
     this.start    = begin;
     this.subTrans.localPosition = this.start;
     if (mag.x < 0f)
     {
         mag.x = UnityEngine.Random.Range(1f, -mag.x);
     }
     if (mag.y < 0f)
     {
         mag.y = UnityEngine.Random.Range(1f, -mag.y);
     }
     if (mag.z < 0f)
     {
         mag.z = UnityEngine.Random.Range(1f, -mag.z);
     }
     this.magnitude = mag;
     if (oscill.x < 0f)
     {
         oscill.x = UnityEngine.Random.Range(1f, -oscill.x);
     }
     if (oscill.y < 0f)
     {
         oscill.y = UnityEngine.Random.Range(1f, -oscill.y);
     }
     if (oscill.z < 0f)
     {
         oscill.z = UnityEngine.Random.Range(1f, -oscill.z);
     }
     this.oscillations      = oscill;
     this.m_mode            = EZAnimation.ANIM_MODE.By;
     this.duration          = dur;
     this.m_wait            = delay;
     this.completedDelegate = del;
     this.startDelegate     = startDel;
     base.StartCommon();
     EZAnimator.instance.AddAnimation(this);
 }
コード例 #30
0
    public static RunAnimClip Do(GameObject sub, string clip, float blend, float dur, float delay, EZAnimation.CompletionDelegate startDel, EZAnimation.CompletionDelegate del)
    {
        RunAnimClip runAnimClip = (RunAnimClip)EZAnimator.instance.GetAnimation(EZAnimation.ANIM_TYPE.AnimClip);

        runAnimClip.Start(sub, clip, blend, dur, delay, startDel, del);
        return(runAnimClip);
    }