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); }
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); }
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); }
public void ResetDefaults() { this.pingPong = true; this.restartOnRepeat = false; this.data = null; this.completedDelegate = null; this.startDelegate = null; }
//! 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); } }
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); }
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); }
public void Clear() { this.completedDelegate = null; this.startDelegate = null; this.data = null; }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }