예제 #1
0
    /// <summary>
    /// 返回值表示是否有属性克制, True代表确定有属性克制
    /// </summary>

    public bool Set(BanBattleRole.Attribute attackAttribute, BanBattleRole.Attribute defenseAttribute)
    {
        Core.Data.soundManager.SoundFxPlay(SoundFx.FX_Explosion);

        sprite_Attack.spriteName  = BanTools.GetAttributeName(attackAttribute);
        sprite_Defense.spriteName = BanTools.GetAttributeName(defenseAttribute);

        sprite_Attack.MakePixelPerfect();
        sprite_Defense.MakePixelPerfect();

        transform.localScale = new Vector3(15f, 15f, 15f);

        state = BanTools.GetAttributeState(attackAttribute, defenseAttribute);
        if (state == 1)
        {
            sprite_Attack.transform.localPosition = new Vector3(sprite_Attack.transform.localPosition.x - 10f, sprite_Attack.transform.localPosition.y, sprite_Attack.transform.localPosition.z);
            sprite_Attack.transform.localScale    = new Vector3(EnlargeFactor, EnlargeFactor, EnlargeFactor);
            sprite_Defense.transform.localScale   = new Vector3(1.0f, 1.0f, 1.0f);
        }
        else if (state == -1)
        {
            sprite_Defense.transform.localPosition = new Vector3(sprite_Defense.transform.localPosition.x + 10f, sprite_Defense.transform.localPosition.y, sprite_Defense.transform.localPosition.z);
            sprite_Attack.transform.localScale     = new Vector3(1.0f, 1.0f, 1.0f);
            sprite_Defense.transform.localScale    = new Vector3(EnlargeFactor, EnlargeFactor, EnlargeFactor);
        }

        MiniItween itween = MiniItween.ScaleTo(gameObject, new Vector3(1.0f, 1.0f, 1.0f), ScaleTime, ScaleType);

        itween.myDelegateFunc += shake;

        return(state != 0);
    }
예제 #2
0
    void Step4()
    {
        MiniItween.ColorTo(m_AnimatinSp[3].gameObject, new V4(Color.white), 0.2f, MiniItween.Type.ColorWidget);
        MiniItween _tween = MiniItween.ScaleTo(m_AnimatinSp[3].gameObject, new Vector3(0.8f, 0.8f, 0.8f), 0.2f);

        _tween.myDelegateFunc += Step4_subsidiary;
    }
예제 #3
0
    /// <summary>
    /// 字母O
    /// </summary>

    IEnumerator Word_O()
    {
        UILabel lbl_O = WarningWord[1];

        lbl_O.gameObject.SetActive(true);
        Blood2.gameObject.SetActive(true);

        lbl_O.alpha = 0f;
        lbl_O.transform.localScale = Word_Scale * Vector3.one;

        Blood2.alpha = Blood_Alpha;
        Blood2.transform.localScale = Word_Scale * Vector3.one;


        MiniItween.ScaleTo(lbl_O.gameObject, Word_Final * Vector3.one, Word_Time, MiniItween.EasingType.EaseInCubic);
        MiniItween.ColorTo(lbl_O.gameObject, new V4(Color.red), Word_Time, MiniItween.Type.ColorWidget);

        MiniItween.ScaleTo(Blood2.gameObject, Word_Final * Vector3.one, Word_Time);
        MiniItween.ColorTo(Blood2.gameObject, new V4(Color.white), Word_Time, MiniItween.Type.ColorWidget);

        yield return(new WaitForSeconds(Word_Time));

        yield return(new WaitForEndOfFrame());

        lbl_O.transform.localScale  = Vector3.one;
        Blood2.transform.localScale = Vector3.one;
    }
예제 #4
0
    /// <summary>
    /// 显示Go动画
    /// </summary>
    IEnumerator GoAnim()
    {
        UI_Go.gameObject.SetActive(true);
        UI_Go.transform.localScale = 5 * Vector3.one;
        UI_Go.alpha = 0.2f;

        MiniItween.ScaleTo(UI_Go.gameObject, 0.9f * Vector3.one, GoAinmTime, MiniItween.EasingType.EaseInExpo);
        MiniItween.ColorTo(UI_Go.gameObject, new V4(Color.white), GoAinmTime, MiniItween.Type.ColorWidget);
        yield return(new WaitForSeconds(GoAinmTime));

        yield return(new WaitForEndOfFrame());

        MiniItween.ScaleTo(UI_Go.gameObject, Vector3.one, GoSmal);
        yield return(new WaitForSeconds(GoSmal));

        ///停留
        yield return(new WaitForSeconds(GoStay));

        MiniItween.ScaleTo(UI_Go.gameObject, Vector3.one * 1.1f, GoSmal);
        yield return(new WaitForSeconds(GoSmal));

        MiniItween.ScaleTo(UI_Go.gameObject, 5 * Vector3.one, GoAinmTime);
        MiniItween.ColorTo(UI_Go.gameObject, new V4(Vector3.zero), GoAinmTime, MiniItween.Type.ColorWidget);
        yield return(new WaitForSeconds(GoAinmTime));

        UI_Go.gameObject.SetActive(false);
    }
예제 #5
0
    /// <summary>
    /// 之后的所有字母
    /// </summary>

    IEnumerator Word_Later()
    {
        for (int index = 2; index < 7; ++index)
        {
            UILabel lbl_word = WarningWord[index];
            lbl_word.gameObject.SetActive(true);

            lbl_word.alpha = 0f;
            lbl_word.transform.localScale = Word_Scale * Vector3.one;

            MiniItween.ScaleTo(lbl_word.gameObject, Word_Final * Vector3.one, Word_Time, MiniItween.EasingType.EaseInCubic);
            MiniItween.ColorTo(lbl_word.gameObject, new V4(Color.red), Word_Time, MiniItween.Type.ColorWidget);

            yield return(new WaitForSeconds(Word_Time));

            yield return(new WaitForEndOfFrame());

            lbl_word.transform.localScale = Vector3.one;

            if (index == 3)
            {
                StartCoroutine(Blood3Anim());
            }
        }

        yield return(new WaitForSeconds(AllWord_Show_Time));
    }
예제 #6
0
	void SetCompleteScale(GameObject g)
	{
//		mLockClick = false;
		MiniItween m = MiniItween.MoveTo(gameObject, new Vector3(0,29,-340.0f), 0.25f);
		MiniItween.ScaleTo(gameObject, new Vector3(95,95,75),0.25f);
		m.myDelegateFuncWithObject += SetCompleteMove;
    }
예제 #7
0
 void TweenScale(int step)
 {
     RED.SetActive(true, m_Anims [step]);
     RED.LogWarning(step.ToString());
     MiniItween.ScaleTo(m_Anims [step], m_animTo [step], ANIM_TIME [step]);
     TweenColor.Begin(m_Anims [step], ANIM_TIME [step], Color.white);
 }
예제 #8
0
    public void SetInitPos(int m_Id, Vector3 _temp)
    {
        MiniItween m = MiniItween.MoveTo(gameObject, _temp, 0.4f, MiniItween.EasingType.Linear, false);

        m.myDelegateFuncWithObject += FinishHead;
        MiniItween.ScaleTo(gameObject, new Vector3(1f, 1f, 1f), 0.4f);
    }
예제 #9
0
    IEnumerator ReadyAnim()
    {
        ///
        /// 显示Ready 动画
        ///
        UI_Ready.gameObject.SetActive(true);
        UI_Ready.transform.localScale = Vector3.zero;

        MiniItween.ScaleTo(UI_Ready.gameObject, 1.1f * Vector3.one, ReadyAnimTime);
        yield return(new WaitForSeconds(ReadyAnimTime));

        MiniItween.ScaleTo(UI_Ready.gameObject, Vector3.one, ReadyAnimTimeS);
        yield return(new WaitForSeconds(ReadyAnimTimeS));

        yield return(new WaitForSeconds(ReadyStay));

        ///往回显示Ready动画
        MiniItween.ScaleTo(UI_Ready.gameObject, 1.1f * Vector3.one, ReadyAnimTimeS);
        yield return(new WaitForSeconds(ReadyAnimTimeS));

        MiniItween.ScaleTo(UI_Ready.gameObject, Vector3.zero, ReadyAnimTime);
        yield return(new WaitForSeconds(ReadyAnimTime));

        UI_Ready.gameObject.SetActive(false);
    }
예제 #10
0
	public void SetFinalPos()
	{
		if(key)return;
		MiniItween m = MiniItween.MoveTo(gameObject, CradSystemFx.GetInstance().mPetBoxPos, 0.4f);
		MiniItween.ScaleTo(gameObject, new Vector3(0,0,0), 0.4f);
		MiniItween.RotateTo(gameObject, Quaternion.Euler(new Vector3(0,180,0)), 1.5f);
		m.myDelegateFuncWithObject += SetFinalPos;
		
	}
예제 #11
0
    //显示金币 --支持到6位数字
    void showCoinCount(int num)
    {
        CoinNum.text = "+" + num.ToString();

        CoinNum.color = new Color(1f, 1f, 1f, 0f);
        CoinNum.transform.localScale = Vector3.one * 3;

        MiniItween.ScaleTo(CoinNum.gameObject, Vector3.one, 0.1f);
        MiniItween.ColorTo(CoinNum.gameObject, new V4(Color.yellow), 0.1f, MiniItween.Type.ColorWidget);
    }
예제 #12
0
    void StepThree()
    {
        GameObject obj_2       = spAni[2].gameObject;
        Vector3    targetScale = Vector3.one * 1.3f;

        MiniItween.ScaleTo(obj_2, targetScale, 0.15f).myDelegateFunc += () => {
            MiniItween.ScaleTo(obj_2, Vector3.one, 0.1f);
        };
        //  MiniItween.Shake(obj_2,new Vector3(6,6,0),0.2f,MiniItween.EasingType.EaseInCubic,false);
    }
예제 #13
0
    IEnumerator Step8()
    {
        Sp8.gameObject.SetActive(true);
        Sp8.transform.localScale = Vector3.zero;

        MiniItween.ScaleTo(Sp8.gameObject, Step8ScaleLarge * Vector3.one, Step8ScaleTime);
        yield return(new WaitForSeconds(Step8ScaleTime));

        MiniItween.ScaleTo(Sp8.gameObject, Vector3.one, Step8ReduceTime);
        yield return(new WaitForSeconds(Step8ReduceTime + Gap8));
    }
예제 #14
0
    void SetDetail()
    {
        mName.gameObject.SetActive(true);
        at.gameObject.SetActive(true);
        df.gameObject.SetActive(true);
        Attribute.gameObject.SetActive(true);

        mName.text = mMonster.config.name;
        at.text    = Mathf.RoundToInt(mMonster.config.atk + 0.5f).ToString();
        df.text    = Mathf.RoundToInt(mMonster.config.def + 0.5f).ToString();
        int attr = (int)(mMonster.RTData.Attribute);

        Attribute.spriteName = "Attribute_" + attr.ToString();
        MiniItween mm = MiniItween.ScaleTo(mName.gameObject, new Vector3(1f, 1f, 1f), 0.15f);

        MiniItween.ScaleTo(at.gameObject, new Vector3(1f, 1f, 1f), 0.15f);
        MiniItween.ScaleTo(df.gameObject, new Vector3(1f, 1f, 1f), 0.15f);

        if (mMonster.config.jinjie > 0)
        {
            int m_temp = mMonster.config.star;
            int m_max  = 6;
            for (int i = m_max - 1; i > -1; i--)
            {
                mStars[i].spriteName = "common-0043";
                if (i > (m_max - m_temp) - 1)
                {
                    mStars[i].color = Color.white;
                }
                else
                {
                    mStars[i].color = Color.black;
                }
            }
        }
        else
        {
            int m_max = 6;
            for (int i = 0; i < m_max; i++)
            {
                mStars[i].spriteName = "common-0043";
                mStars[i].color      = Color.white;
            }
        }
        for (int i = 0; i < mStarPosList.Count; i++)
        {
            mStars[i].gameObject.SetActive(true);
            mStars[i].gameObject.transform.localPosition = mStarPosList[i];
            MiniItween.ScaleTo(mStars[i].gameObject, new Vector3(1.1f, 1.1f, 1.1f), 0.15f).myDelegateFuncWithObject += StarShake;
        }


        mm.myDelegateFuncWithObject += ShakeCamera;
    }
예제 #15
0
    void AoYiExploreMove(UISpriteAnimation whichone)
    {
        whichone.AnimationEndDelegate = null;

        UISprite explore = whichone.GetComponent <UISprite>();

        explore.spriteName = "blood6";
        MiniItween.MoveTo(explore.gameObject, Vector3.zero, MoveRedPointTime, true);
        MiniItween.ColorTo(explore.gameObject, new V4(new Color(1.0f, 1.0f, 1.0f, RedPointHideAlpha)), MoveRedPointTime, MiniItween.EasingType.EaseInQuad, MiniItween.Type.ColorWidget);
        MiniItween.ScaleTo(explore.gameObject, RedPointHideScale, MoveRedPointTime).FinishedAnim = () => { StartCoroutine(DragonAppear());  whichone.gameObject.SetActive(false); };
    }
예제 #16
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);
        };
    }
예제 #17
0
	void PlayCardAnim()
	{
//				kapai.SetMonStar (mMonster.Star);

		CardSystemCell nn = gameObject.GetComponent<CardSystemCell>();
		CradSystemFx.GetInstance().mSelectScript = nn;

		MiniItween m = MiniItween.ScaleTo(gameObject, new Vector3(44,44,40),0.1f);
		m.myDelegateFuncWithObject += SetCompleteScale;


	}
예제 #18
0
    public void SetInitPos(int m_Id, int m_index)
    {
        mId    = m_Id;
        mIndex = m_index;

        if (CradSystemFx.GetInstance().mTargetPosDic.TryGetValue(m_index, out mLocalPos))
        {
            MiniItween m = MiniItween.MoveTo(_Scale.gameObject, mLocalPos, 0.4f, MiniItween.EasingType.Linear, false);
            m.myDelegateFuncWithObject += FinishHead;
            MiniItween.ScaleTo(_Scale.gameObject, new Vector3(1f, 1f, 1f), 0.4f);
        }
    }
예제 #19
0
 ///
 /// 展示一个公告信息
 ///
 public void ShowBroadCast()
 {
     broadCast.SetActive(true);
     broadCast.transform.localScale = Vector3.zero;
     MiniItween.ScaleTo(broadCast, Vector3.one, 0.15f);
     AsyncTask.QueueOnMainThread(() => {
         content.enabled = false;
         content.enabled = true;
         content.MakePixelPerfect();
     }, 0.3f);
     Invoke("MakePerfect", 0.5f);
 }
예제 #20
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);
    }
예제 #21
0
    IEnumerator CastDragonAoYiAnim()
    {
        Icon.color = new Color(0.0f, 0.0f, 0.0f, 1.0f);

        MiniItween.ScaleTo(gameObject, new Vector3(1.2f, 1.2f, 1.2f), Time, OutType);
        yield return(new WaitForSeconds(Time));

        MiniItween.ScaleTo(gameObject, Vector3.one, Time, InType).myDelegateFunc += () => {
            Icon.depth    = 20;
            Boarder.depth = 21;
        };
    }
예제 #22
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);
    }
예제 #23
0
    public IEnumerator lockIconAnimationComplete(TweenRotation tr)
    {
        yield return(new WaitForSeconds(0.5f));

        Destroy(tr);

        MiniItween mi = MiniItween.ColorFromTo(this.lockIconObj, new V4(1.0f, 1.0f, 1.0f, 1f), new V4(1.0f, 1.0f, 1.0f, 0f), 0.1f, MiniItween.EasingType.Normal, MiniItween.Type.ColorWidget);

        mi.myDelegateFuncWithObject += lockIconObjScaleToComplete;
//			MiniItween.ColorFromTo(g2, new V4(1.0f, 1.0f, 1.0f, 0f), new V4(1.0f, 1.0f, 1.0f, 1.0f), 0.3f, MiniItween.EasingType.Normal, MiniItween.Type.ColorWidget);

        MiniItween.ScaleTo(this.lockIconObj, new Vector3(1.5f, 1.5f, 1), 0.05f);
    }
예제 #24
0
    IEnumerator scaleProSp(UISprite ProSp)
    {
        proSp_1.gameObject.SetActive(false);
        ProSp.gameObject.SetActive(true);
        yield return(null);

        ProSp.spriteName   = "Attribute_" + proType.ToString();
        proSp_1.spriteName = "Attribute_" + proType.ToString();
        ProSp.gameObject.transform.localScale = new Vector3(5, 5, 5);
        yield return(null);

        MiniItween.ScaleTo(ProSp.gameObject, new Vector3(1f, 1f, 1f), 0.2f, MiniItween.EasingType.EaseOutCubic);
    }
예제 #25
0
    IEnumerator scaleProSp(UISprite ProSp)
    {
        ProSp_2.gameObject.SetActive(false);
        ProSp.gameObject.SetActive(true);
        ProSp.spriteName = "Attribute_" + proType.ToString();
        ProSp.MakePixelPerfect();
        ProSp.gameObject.transform.localScale = new Vector3(5, 5, 5);
        yield return(null);

        MiniItween.ScaleTo(ProSp.gameObject, new Vector3(1f, 1f, 1f), 0.2f, MiniItween.EasingType.EaseOutCubic).myDelegateFunc += () => {
            ProSp.MakePixelPerfect();
        };
    }
예제 #26
0
 void ZoomOut()
 {
     if (state == 1)
     {
         MiniItween.ScaleTo(sprite_Attack.gameObject, new Vector3(3.0f, 3.0f, 3.0f), 0.2f);
         MiniItween.ColorTo(sprite_Attack.gameObject, new V4(new Color(1.0f, 1.0f, 1.0f, 0.0f)), 0.2f, MiniItween.Type.ColorWidget);
     }
     else if (state == -1)
     {
         MiniItween.ScaleTo(sprite_Defense.gameObject, new Vector3(3.0f, 3.0f, 3.0f), 0.2f);
         MiniItween.ColorTo(sprite_Defense.gameObject, new V4(new Color(1.0f, 1.0f, 1.0f, 0.0f)), 0.2f, MiniItween.Type.ColorWidget);
     }
 }
예제 #27
0
    public void DestroyPanel()
    {
//        ts1.RemoveOnFinished(new EventDelegate(this ,"DestroyPanel")) ;
//        ts1.enabled = false ;
//
//
//         ts =   TweenScale.Begin(sp.gameObject,0.4f,new Vector3(0.4f, 0.4f , 0.4f ));
//        ts.onFinished.Clear();
//        ts.onFinished .Add(new EventDelegate(this ,"timeScale"));
//		ts.ResetToBeginning();
//        ts.PlayForward();

        MiniItween.ScaleTo(sp.gameObject, new Vector3(0.4f, 0.4f, 0.4f), 0.4f).FinishedAnim = timeScale;
    }
예제 #28
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));
    }
예제 #29
0
    //IEnumerator  moveXing(UISprite sp)
    ///{


    // 缩放
//        TweenScale tween = gameObject.GetComponent<TweenScale>();
//        tween.delay = 0;
//        tween.duration = 0.25f;
//        tween.from =  Vector3.one;
//        tween.to = new Vector3(0.01f,0.01f,0.01f);
//        tween.onFinished.Clear();
//        tween.onFinished.Add(new EventDelegate(this,"DestroyPanel"));
//        tween.Reset();
//        tween.PlayForward();


    // }

    public void onfinshi()
    {
//        tp.enabled = false ;
//
//        ts1 =   TweenScale.Begin(sp.gameObject,0.1f,Vector3.one);
//
//        ts1.onFinished.Clear();
//        ts1.onFinished .Add(new EventDelegate(this ,"DestroyPanel"));
//		ts1.ResetToBeginning();
//
//        ts1.PlayForward();

        MiniItween.ScaleTo(sp.gameObject, Vector3.one, 0.1f).FinishedAnim = DestroyPanel;
    }
예제 #30
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);
    }