示例#1
0
 void ShakeAndLight()
 {
     pslight.Play();
     MiniItween.Shake(gameObject, shakeVec, shakeTime, MiniItween.EasingType.Bounce).myDelegateFunc += delegate() {
         StartCoroutine(Quit());
     };
 }
示例#2
0
    //------------------Page4--------------------

    void PlayPage5()
    {
        Core.Data.soundManager.SoundFxPlay(SoundFx.FX_BaoZha4);
        MiniItween.Shake(Page5_Left.gameObject, new Vector3(5f, 5f, 0), 2f, MiniItween.EasingType.EaseInCubic, false);
        Page5_fly.enabled = true;
        Invoke("PlayPage5_2", 2f);
    }
示例#3
0
    IEnumerator shakeEx()
    {
        MiniItween.Shake(Camera.main.gameObject, shakeV3, shakeTime, ShakeType, false);
        yield return(new WaitForSeconds(shakeTime));

        Back();
    }
示例#4
0
    public void CloseDoor()
    {
        MiniItween.MoveTo(DoorLeft, oldDoorLeft, CloseDoorTime, MiniItween.EasingType.EaseOutCirc, false);
        MiniItween.MoveTo(DoorRight, oldDoorRight, CloseDoorTime, MiniItween.EasingType.EaseOutCirc, false);

        MiniItween.Shake(Door, DoorMoveV3, DoorDisTime, MiniItween.EasingType.Linear, false);

        Invoke("OpenBattleDoor", RepeatTime);
    }
示例#5
0
 void PlayPage7_2()
 {
     Page7_fly.gameObject.SetActive(false);
     Page7_bomb.gameObject.SetActive(true);
     Page7_gangdang.enabled = true;
     Core.Data.soundManager.SoundFxPlay(SoundFx.FX_BaoZha1);
     MiniItween.Shake(Page7_back.gameObject, new Vector3(5f, 5f, 0), 2f, MiniItween.EasingType.EaseInCubic, false);
     Invoke("PlayPage7_3", 2f);
 }
示例#6
0
    public void aoYiIconAnimationComplete(GameObject g)
    {
        MiniItween m = g.GetComponent <MiniItween>();

        m.myDelegateFuncWithObject -= aoYiIconAnimationComplete;

        setAoYi();

        MiniItween.Shake(this.background, new Vector3(0, 2.0f, 0), 0.2f, MiniItween.EasingType.Normal, false);
    }
示例#7
0
    IEnumerator PlayShakeAnim()
    {
        yield return(new WaitForSeconds(0.3f));

        MiniItween.Shake(this.gameObject, new Vector3(20, 20, 0), 0.4f, MiniItween.EasingType.Normal, false);
        for (int i = 0; i < m_particles.Length; i++)
        {
            m_particles [i].enableEmission = true;
            m_particles [i].Play();
        }
    }
示例#8
0
    void StepSix()
    {
        GameObject obj_5 = spAni[5].gameObject;
        GameObject obj_0 = spAni[0].gameObject;

        obj_5.SetActive(true);
        MiniItween.ScaleTo(obj_5, Vector3.one, 0.2f).myDelegateFunc += () =>
        {
            MiniItween.Shake(obj_0, new Vector3(10, 10, 0), 0.2f, MiniItween.EasingType.EaseInCubic, false);
        };
    }
示例#9
0
    void StepFour()
    {
        GameObject obj_3       = spAni[3].gameObject;
        GameObject obj_2       = spAni[2].gameObject;
        Vector3    targetScale = Vector3.one * 1.3f;

        MiniItween.ScaleTo(obj_3, targetScale, 0.15f).myDelegateFunc += () => {
            MiniItween.ScaleTo(obj_3, Vector3.one, 0.1f);
            MiniItween.Shake(obj_2, new Vector3(6, 6, 0), 0.2f, MiniItween.EasingType.EaseInCubic, false);
        };
    }
示例#10
0
    void animation_6()
    {
        GameObject go3 = listSprite2D[2].gameObject;
        GameObject go5 = listSprite2D[4].gameObject;

        MiniItween.Shake(go5, new Vector3(5f, 5f, 0), 0.2f, MiniItween.EasingType.EaseInCubic, false);
        MiniItween.Shake(go3, new Vector3(5f, 5f, 0), 0.2f, MiniItween.EasingType.EaseInCubic, false);

        //Debug.Log("动画结束");

        Invoke("animation_Mask_Wait", 1f);
    }
示例#11
0
    /// <summary>
    /// 显示第一次的动画
    /// </summary>

    IEnumerator FirstShowAnim()
    {
        //先把缩放到0
        gameObject.transform.localScale = InitVec;

        //开始放大
        MiniItween.ScaleTo(gameObject, Vector3.one, ScaleTime, MiniItween.EasingType.EaseInCirc);
        yield return(new WaitForSeconds(ScaleTime));

        //震动
        MiniItween.Shake(gameObject, ShakeVec, ShakeTime, MiniItween.EasingType.EaseOutCirc);
    }
示例#12
0
    IEnumerator OpenDoor()
    {
        DoorLeft.transform.localPosition  = oldDoorLeft;
        DoorRight.transform.localPosition = oldDoorRight;

        MiniItween.Shake(DoorLeft, DoorShakeV3, DoorShakeTime, MiniItween.EasingType.EaseInOutQuart, false);
        MiniItween.Shake(DoorRight, DoorShakeV3, DoorShakeTime, MiniItween.EasingType.EaseInOutQuart, false);

        yield return(new WaitForSeconds(DoorShakeTime));

        StartCoroutine(DoorShift());
    }
示例#13
0
    IEnumerator Step4()
    {
        Sp4.gameObject.SetActive(true);
        Sp4.transform.localPosition = Step4StarPos;
        MiniItween.MoveTo(Sp4.gameObject, Step4EndPos, Step4FlipTime);
        yield return(new WaitForSeconds(Step4StartShake));

        MiniItween.Shake(Sp1.gameObject, Step4ShakeVec3, Step4ShakeTime, MiniItween.EasingType.Linear);
        MiniItween.Shake(Sp2.gameObject, Step4ShakeVec3, Step4ShakeTime, MiniItween.EasingType.Linear);

        yield return(new WaitForSeconds(Gap4));
    }
    IEnumerator showTip()
    {
        GoTip.SetActive(true);

        GoTip.transform.localPosition = TipStarVec3;
        lblTip.color = new Color(1f, 1f, 0f, 0f);

        MiniItween.MoveTo(GoTip, Vector3.zero, MoveTime);
        MiniItween.ColorTo(lblTip.gameObject, new V4(new Color(1f, 1f, 0f, 1f)), MoveTime, MiniItween.Type.ColorWidget);
        yield return(new WaitForSeconds(MoveTime));

        MiniItween.Shake(GoTip, ShakeVec3, 0.2f, MiniItween.EasingType.EaseOutCirc).FinishedAnim = () => { GoTip.transform.localPosition = Vector3.zero; };
    }
示例#15
0
    /// <summary>
    /// 撞击动画
    /// </summary>
    /// <returns>The animation.</returns>
    IEnumerator HitAnim(bool vs)
    {
        float scale = vs ? HitScaleEx : HitScale;

        gameObject.transform.localScale = Vector3.one * scale;

        Vector3 normal = vs ? VS_InitScale * Vector3.one : Vector3.one;

        MiniItween.ScaleTo(gameObject, normal, HitTime, MiniItween.EasingType.EaseInExpo);
        yield return(new WaitForSeconds(HitTime));

        MiniItween.Shake(gameObject, ShakeVec3, ShakeTime, MiniItween.EasingType.EaseOutCubic);
    }
示例#16
0
    /// <summary>
    /// 翻转动画,可以使用技能
    /// </summary>
    /// <returns>The animation.</returns>
    IEnumerator ShowAnimationOpen(int skillIconId, int NuQi)
    {
        Vector3 Quart = new Vector3(0f, 90f, 0f);
        Vector3 Half  = new Vector3(0f, 180f, 0f);

        //播放声效
        Core.Data.soundManager.SoundFxPlay(SoundFx.Btn2);
        //播放特效
        goPartExplore.gameObject.SetActive(true);

        //先放大
        MiniItween.ScaleTo(Icon_BG.gameObject, Min_Scale, Scale_Time, ScaleType);
        yield return(new WaitForSeconds(Scale_Time));

        //再旋转
        MiniItween.RotateTo(Icon_BG.gameObject, Quart, Half_Rotate_Time);
        yield return(new WaitForSeconds(Half_Rotate_Time));

        // 换贴图
        Icon_BG.spriteName = "nuqijizhengmian";
        //开始显示技能图标
        Icon.transform.localScale    = Min_Scale;
        Icon.transform.localRotation = Quaternion.Euler(-Quart);
        Icon.gameObject.SetActive(true);
//        Icon.spriteName = skillIconId.ToString();

        Icon.gameObject.GetComponent <UIButton> ().normalSprite = skillIconId.ToString();
        txtPoint.text = NuQi.ToString();

        //再次旋转90°
        MiniItween.RotateTo(Icon_BG.gameObject, Half, Half_Rotate_Time);
        MiniItween.RotateTo(Icon.gameObject, Vector3.zero, Half_Rotate_Time);
        yield return(new WaitForSeconds(Half_Rotate_Time));

        //显示粒子效果
        goParticle.gameObject.SetActive(true);

        //再次缩小回去
        MiniItween.ScaleTo(Icon_BG.gameObject, Vector3.one, Scale_Time, ScaleType);
        MiniItween.ScaleTo(Icon.gameObject, Vector3.one, Scale_Time, ScaleType);
        yield return(new WaitForSeconds(Scale_Time));

        //震动
        Core.Data.soundManager.SoundFxPlay(SoundFx.Btn3);
        MiniItween.Shake(gameObject, ShakeVec, Shake_Time, MiniItween.EasingType.EaseOutCirc);
        //goPoint.SetActive(true);

        //1S后消除
        Invoke("hideExplore", 1f);
    }
示例#17
0
    IEnumerator Step5()
    {
        Sp5.gameObject.SetActive(true);
        Sp5.transform.localScale = Vector3.one * InitScaleFac;
        Sp5.color = trans;

        MiniItween.ScaleTo(Sp5.gameObject, Vector3.one * 0.9f, Step5ScaleTime);
        MiniItween.ColorTo(Sp5.gameObject, new V4(Color.white), Step5ScaleTime, MiniItween.Type.ColorWidget);
        yield return(new WaitForSeconds(Step5ScaleTime));

        MiniItween.Shake(Sp4.gameObject, Step4ShakeVec3, Step5ShakeTime, MiniItween.EasingType.Linear);
        MiniItween.ScaleTo(Sp5.gameObject, Vector3.one, 0.1f);
        yield return(new WaitForSeconds(Step5ShakeTime));
    }
示例#18
0
    void animation_5()
    {
        //Debug.Log("动画五结束");
        //Debug.Log("动画六开始");


        GameObject go2 = listSprite2D[1].gameObject;
        GameObject go3 = listSprite2D[2].gameObject;

        MiniItween.Shake(go2, new Vector3(5f, 5f, 0), 0.2f, MiniItween.EasingType.EaseInCubic, false);
        MiniItween.Shake(go3, new Vector3(5f, 5f, 0), 0.2f, MiniItween.EasingType.EaseInCubic, false);


        Invoke("animation_6_Wait", 0.4f);
    }
示例#19
0
    /// <summary>
    /// 持续的点击
    /// </summary>

    IEnumerator KeepShowAnim(GameObject[] GoObj)
    {
        foreach (GameObject go in GoObj)
        {
            //先把缩放到0
            go.transform.localScale = MaxNumVec;

            //开始放大
            MiniItween.ScaleTo(go, Vector3.one, ScaleNumTime, MiniItween.EasingType.EaseInCirc);
            yield return(new WaitForSeconds(ScaleTime));

            //震动
            MiniItween.Shake(go, ShakeNumVec, ShakeNumTime, MiniItween.EasingType.EaseOutCirc);
        }
    }
示例#20
0
    IEnumerator Step7()
    {
        Part1.gameObject.SetActive(false);
        Sp7.gameObject.SetActive(true);

        Sp7.transform.localPosition = Step7StartPos;
        MiniItween.MoveTo(Sp7.gameObject, Step7EndPos, Step7Fliptime);
        yield return(new WaitForSeconds(Step7Fliptime));

        Sp7.transform.localPosition = Step7EndPos;

        MiniItween.Shake(Sp7.gameObject, Step7ShakeVec3, Step7ShakeTime, MiniItween.EasingType.Linear);

        yield return(new WaitForSeconds(Step7ShakeTime));
    }
示例#21
0
    IEnumerator Step11()
    {
        Sp11.gameObject.SetActive(true);
        Sp11.transform.localPosition = Step11StarPos;

        MiniItween.MoveTo(Sp11.gameObject, Step11EndPos, Step11MoveTime);
        yield return(new WaitForSeconds(Step11MoveTime));

        MiniItween.Shake(Sp9.gameObject, Step4ShakeVec3, Step11ShakeTime, MiniItween.EasingType.Linear);
        yield return(new WaitForEndOfFrame());

        yield return(new WaitForEndOfFrame());

        Sp11.transform.localPosition = Step11Pos;
        MiniItween.Shake(Sp10.gameObject, Step4ShakeVec3, Step11ShakeTime, MiniItween.EasingType.Linear);
        yield return(new WaitForSeconds(Gap11));
    }
示例#22
0
    IEnumerator Step13()
    {
        Sp13.gameObject.SetActive(true);
        Sp13.transform.localScale = Vector3.one * Step13InitScale;

        MiniItween.ScaleTo(Sp13.gameObject, Vector3.one * Step13Large, Step13ScaleTime);
        yield return(new WaitForSeconds(Step13ScaleTime));

        yield return(new WaitForEndOfFrame());

        Sp13.transform.localScale = Vector3.one;
        yield return(new WaitForEndOfFrame());

        Sp13.transform.localScale = Vector3.one;

        MiniItween.Shake(Sp13.gameObject, Step13ShakeVec, Step13ShakeTime, MiniItween.EasingType.EaseOutCirc);
        yield return(new WaitForSeconds(Step13ShakeTime));
    }
示例#23
0
    IEnumerator Hit()
    {
        Color trans = new Color(1F, 1F, 1F, 0F);

        foreach (UILabel lbl in words)
        {
            lbl.gameObject.SetActive(true);

            lbl.transform.localScale = LargeVec3;
            lbl.color = trans;

            MiniItween.ScaleTo(lbl.gameObject, Vector3.one, ScaleTime, MiniItween.EasingType.EaseOutCubic);
            MiniItween.ColorTo(lbl.gameObject, new V4(Color.white), ScaleTime, MiniItween.EasingType.EaseOutCubic, MiniItween.Type.ColorWidget);

            yield return(new WaitForSeconds(ScaleTime));

            MiniItween.Shake(lbl.gameObject, ShakeVec3, ShakeTime, MiniItween.EasingType.EaseInCubic);
        }
    }
示例#24
0
    IEnumerator DoorShift()
    {
        MiniItween.MoveTo(DoorLeft, LeftDoorDisappear, DoorDisTime, false);
        MiniItween.MoveTo(DoorRight, RightDoorDisappear, DoorDisTime, false);

        MiniItween.Shake(Door, DoorMoveV3, DoorDisTime, MiniItween.EasingType.Linear, false);

        //Create CRLuo_Scene
        Object obj = PrefabLoader.loadFromPack("CRLuo/System/ShowVS", false, false);

        Instantiate(obj);

        yield return(new WaitForSeconds(LightTime));

        ScaleToSmall();
        //Create Light
        //Instantiate(go_Light);
        obj = null;
    }
示例#25
0
    IEnumerator anim()
    {
        Color trans = new Color(1f, 1f, 1f, 0f);

        //透明,变大的状态
        spK.transform.localScale = InitScale;
        spK.color = trans;
        spO.transform.localScale = InitScale;
        spO.color = trans;

        //开始显示K
        Core.Data.soundManager.SoundFxPlay(SoundFx.FX_KO);
        MiniItween.ScaleTo(spK.gameObject, Vector3.one, ScaleTime);
        MiniItween.ColorTo(spK.gameObject, new V4(Color.white), ScaleTime, MiniItween.Type.ColorWidget);
        yield return(new WaitForSeconds(ScaleTime));

        //开始震动K
        MiniItween.Shake(spK.gameObject, ShakeVec, ShakeTime, MiniItween.EasingType.EaseOutExpo);

        //开始显示O
        Core.Data.soundManager.SoundFxPlay(SoundFx.FX_KO);
        MiniItween.ScaleTo(spO.gameObject, Vector3.one, ScaleTime);
        MiniItween.ColorTo(spO.gameObject, new V4(Color.white), ScaleTime, MiniItween.Type.ColorWidget);
        yield return(new WaitForSeconds(ScaleTime));

        //开始震动O
        MiniItween.Shake(spO.gameObject, ShakeVec, ShakeTime, MiniItween.EasingType.EaseOutExpo);

        //保持稳定
        yield return(new WaitForSeconds(HoldTime));


        //开始消失KO
        MiniItween.ScaleTo(spK.gameObject, InitScale, ScaleTime);
        MiniItween.ColorTo(spK.gameObject, new V4(trans), ScaleTime, MiniItween.EasingType.EaseOutExpo, MiniItween.Type.ColorWidget);
        MiniItween.ScaleTo(spO.gameObject, InitScale, ScaleTime);
        MiniItween.ColorTo(spO.gameObject, new V4(trans), ScaleTime, MiniItween.EasingType.EaseOutExpo, MiniItween.Type.ColorWidget);
    }
示例#26
0
    /// <summary>
    /// 翻转动画,不可以使用技能
    /// </summary>
    /// <returns>The animation close.</returns>

    IEnumerator ShowAnimationClose()
    {
        Vector3 Quart = new Vector3(0f, 90f, 0f);

        //先关闭消耗怒气点信息,再次关闭特效
        //goPoint.SetActive(false);
        goParticle.gameObject.SetActive(false);

        Core.Data.soundManager.SoundFxPlay(SoundFx.Btn2);
        //先放大
        MiniItween.ScaleTo(Icon_BG.gameObject, Min_Scale, Scale_Time, ScaleType);
        MiniItween.ScaleTo(Icon.gameObject, Min_Scale, Scale_Time, ScaleType);
        yield return(new WaitForSeconds(Scale_Time));

        //再旋转
        MiniItween.RotateTo(Icon_BG.gameObject, Quart, Half_Rotate_Time);
        MiniItween.RotateTo(Icon.gameObject, Quart, Half_Rotate_Time);
        yield return(new WaitForSeconds(Half_Rotate_Time));

        //隐藏技能图标
        Icon.gameObject.SetActive(false);
        Icon.transform.localRotation = Quaternion.Euler(Vector3.zero);

        Icon_BG.spriteName = "nuqijibeimian";

        //再次旋转90°
        MiniItween.RotateTo(Icon_BG.gameObject, Vector3.zero, Half_Rotate_Time);
        yield return(new WaitForSeconds(Half_Rotate_Time));

        //再次缩小回去
        MiniItween.ScaleTo(Icon_BG.gameObject, Vector3.one, Scale_Time, ScaleType);
        yield return(new WaitForSeconds(Scale_Time));

        //震动
        Core.Data.soundManager.SoundFxPlay(SoundFx.Btn3);
        MiniItween.Shake(gameObject, ShakeVec, Shake_Time, MiniItween.EasingType.EaseOutCirc);
    }
示例#27
0
    IEnumerator ShowDefaultDragon(DragonManager.DragonType dragonType)
    {
        GameObject GoDragon = null;

        Go_NaMeike.transform.localPosition = HideDragonPos;
        Go_Earth.transform.localPosition   = HideDragonPos;

        if (dragonType == DragonManager.DragonType.EarthDragon)
        {
            GoDragon = Go_Earth;
        }
        else
        {
            GoDragon = Go_NaMeike;
        }

        changeDragon();
        MiniItween.MoveTo(GoDragon, ShowDragonPos, ChangeDragonTime, MiniItween.EasingType.EaseInCubic).FinishedAnim = () => {
            MiniItween.Shake(GoDragon, ShakeWave, ShakeTime, MiniItween.EasingType.EaseOutCubic);
        };

        showDefaultBackground(dragonType);

        if (dragonType == DragonManager.DragonType.EarthDragon)
        {
            foreach (DragonBallCell cell in earthCellList)
            {
                cell.showFull();
            }
        }

        yield return(new WaitForSeconds(0.1f));

        earthCheckmark1.gameObject.transform.localPosition = Vector3.left * 120;
        earthCheckmark2.gameObject.transform.localPosition = Vector3.right * 120;
    }
示例#28
0
 void PlayPage4_3()
 {
     Core.Data.soundManager.SoundFxPlay(SoundFx.FX_BaoZha2);
     MiniItween.Shake(BTeft.gameObject, new Vector3(10f, 10f, 0), 1.5f, MiniItween.EasingType.EaseInCubic, false);
     InvokeRepeating("PlayPage4_4", 0.4f, 0.2f);
 }
示例#29
0
    IEnumerator DoShake(float delayTime, Vector3 v3, float animTime, MiniItween.EasingType animType)
    {
        yield return(new WaitForSeconds(delayTime));

        MiniItween.Shake(this.gameObject, v3, animTime, animType);
    }
示例#30
0
 void Step4_subsidiary()
 {
     MiniItween.ScaleTo(m_AnimatinSp[3].gameObject, new Vector3(1f, 1f, 1f), 0.1f);
     MiniItween.Shake(m_AnimatinSp[0].gameObject, new Vector3(0.1f, 0.1f, 0.1f), 0.1f, MiniItween.EasingType.EaseInCubic);
     MiniItween.Shake(m_AnimatinSp[1].gameObject, new Vector3(0.1f, 0.1f, 0.1f), 0.1f, MiniItween.EasingType.EaseInCubic);
 }