Beispiel #1
0
    IEnumerator Draw()
    {
        Screen_Brightness_ONOFF(true);
        if (Man_L != null && Man_R != null)
        {
            Man_L.HandleTypeAnim(CRLuoAnim_Main.Type.GoRush);
            Man_R.HandleTypeAnim(CRLuoAnim_Main.Type.GoRush);
            MiniItween.MoveTo(Man_GameObj_L, new Vector3(0, 0, -Long_Near), Fly_Time);
            MiniItween.MoveTo(Man_GameObj_R, new Vector3(0, 0, Long_Near), Fly_Time);

            yield return(new WaitForSeconds(Fly_Time));

            Man_L.RivalOBJ   = null;
            Man_L.SaveLife   = !KillYou;
            Man_L.Injure_Key = false;
            Man_R.RivalOBJ   = null;
            Man_R.SaveLife   = !KillYou;
            Man_R.Injure_Key = false;

            Man_L.HandleTypeAnim(CRLuoAnim_Main.Type.Attack);
            Man_R.HandleTypeAnim(CRLuoAnim_Main.Type.Attack);

            yield return(new WaitForSeconds(DoubleKill_Time));

            Man_L.HandleTypeAnim(CRLuoAnim_Main.Type.BackRush);
            Man_R.HandleTypeAnim(CRLuoAnim_Main.Type.BackRush);

            MiniItween.MoveTo(Man_GameObj_L, new Vector3(0, 0, -Long_Far), Fly_Time);
            MiniItween.MoveTo(Man_GameObj_R, new Vector3(0, 0, Long_Far), Fly_Time);
        }
    }
    public void OnEnable()
    {
        #region Change By JC
        transform.localPosition = new Vector3(0, 362f, 0);
        MiniItween.MoveTo(gameObject, new Vector3(0, transform.localPosition.y - 60, 0), 0.5f, MiniItween.EasingType.EaseInOutBack);

        int showCount = 0;
        if (ElementShowArray.Length == 4)
        {
            for (int i = 0; i < ElementShowArray.Length; i++)
            {
                if (ElementShowArray[i])
                {
                    showCount++;
                }
                Array_GameObject[i].SetActive(ElementShowArray[i]);
            }

            Root.cellWidth = 5f / (float)showCount * 215f;
            if (showCount != 5)
            {
                Root.cellWidth *= 0.9f;
            }

            float x = -((showCount - 1) * Root.cellWidth + 180) / 2f;
            Root.transform.localPosition = new Vector3(x, 0, 0);
        }
        Root.repositionNow = true;
        #endregion
    }
Beispiel #3
0
    /// <summary>
    /// 自爆群体技能
    /// </summary>
    public IEnumerator GroupExploreSelf(bool leftObj)
    {
        Screen_Brightness_ONOFF(false);
        if (Man_L != null && Man_R != null)
        {
            Man_L.HandleTypeAnim(CRLuoAnim_Main.Type.BackRush);
            Man_R.HandleTypeAnim(CRLuoAnim_Main.Type.BackRush);
            MiniItween.MoveTo(Man_GameObj_L, new Vector3(0, 0, -Long_Far), Fly_Time);
            MiniItween.MoveTo(Man_GameObj_R, new Vector3(0, 0, Long_Far), Fly_Time);
            yield return(new WaitForSeconds(Fly_Time));

            if (leftObj)
            {
                Man_R.RivalOBJ   = Man_L;
                Man_R.SaveLife   = !KillYou;
                Man_L.Injure_Key = false;
                Man_L.SaveLife   = false;
                Man_L.HandleTypeAnim(CRLuoAnim_Main.Type.GroupSkill);
            }
            else
            {
                Man_L.RivalOBJ   = Man_R;
                Man_L.SaveLife   = !KillYou;
                Man_R.Injure_Key = false;
                Man_R.SaveLife   = false;
                Man_R.HandleTypeAnim(CRLuoAnim_Main.Type.GroupSkill);
            }
        }
    }
Beispiel #4
0
    void StepOne()
    {
        GameObject Obj_1     = spAni[1].gameObject;
        Vector3    targetPos = new Vector3(-147, 159, 0);

        MiniItween.MoveTo(Obj_1, targetPos, 0.3f, MiniItween.EasingType.Bounce);
    }
Beispiel #5
0
    //如果多出来的区域,要滑动回去
    private bool SwipToMin()
    {
        Vector3 movepos = transform.localPosition;
        //movepos.x +=  differenceX * 6.0f ;
        //Vector3 curAngle = transform.rotation.eulerAngles;

        bool result = false;

        if (movepos.x < MAX_NEAR_Z)
        {
            //MiniItween.RotateTo(gameObject, new Vector3(curAngle.x, 0, MAX_NEAR_Z), BACKTIME);
            Vector3 pos = movepos;
            pos.x = MAX_NEAR_Z;
            MiniItween.MoveTo(gameObject, pos, BACKTIME);
            result = true;
        }
        else if (movepos.x > MIN_NEAR_Z)
        {
            //MiniItween.RotateTo(gameObject, new Vector3(curAngle.x, 0, MIN_NEAR_Z), BACKTIME);
            Vector3 pos = movepos;
            pos.x = MIN_NEAR_Z;
            MiniItween.MoveTo(gameObject, pos, BACKTIME);
            result = true;
        }
        return(result);
    }
	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;
    }
Beispiel #7
0
    public IEnumerator ShowZhanBuAnim(string content, int width, int height, int X, int Y, float scaleX, float scaleY, bool Level16 = false)
    {
        lblCon.text = content;
        isLevel16   = Level16;

        if (Level16)
        {
            Vector3 adjustStartPos = new Vector3(StartPosLv16.x, FitScreen(StartPosLv16.y), StartPosLv16.z);
            Vector3 adjustEndPos   = new Vector3(EndPosLv16.x, FitScreen(EndPosLv16.y), EndPosLv16.z);

            goDes.transform.localPosition = adjustStartPos;
            MiniItween.MoveTo(goDes, adjustEndPos, moveTime);
        }
        else
        {
            goDes.transform.localPosition = StartPos;
            MiniItween.MoveTo(goDes, EndPos, moveTime);
        }

        goHighArea.transform.localPosition = new Vector3(X, FitScreen(Y), 0f);
        goMaskArea.transform.localPosition = new Vector3(X, FitScreen(Y), 0f);

        goMaskArea.transform.localScale = new Vector3(scaleX, scaleY, 1f);

        Highlight.width  = width;
        Highlight.height = height;

        yield return(new WaitForSeconds(moveTime));

        delayMakeUserCanClick();
    }
Beispiel #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);
    }
Beispiel #9
0
    public void UpAnimImmediate()
    {
        Vector3 target = transform.localPosition + new Vector3(0f, UpDis, 0f);

        MiniItween.MoveTo(gameObject, target, MoveTime, MiniItween.EasingType.EaseInCubic);
        MiniItween.ColorTo(lblChgNum.gameObject, new V4(new Color(1.0f, 1.0f, 1.0f, 0.0f)), MoveTime, MiniItween.Type.ColorWidget);
    }
Beispiel #10
0
    void StepTwo()
    {
        GameObject obj_0     = spAni[0].gameObject;
        Vector3    targetPos = new Vector3(-421, 159, 0);

        MiniItween.MoveTo(obj_0, targetPos, 0.3f, MiniItween.EasingType.Bounce);
    }
Beispiel #11
0
    IEnumerator RemoveFirstRoleIconIE(float delayTime)
    {
        yield return(new WaitForSeconds(delayTime));


        if (getAliveCount > 0)
        {
            float             disappearTime = 0.6f;
            BanBattleRoleIcon aIcon         = list_Team[0];
            TweenAlpha.Begin(aIcon.gameObject, disappearTime, 0.6f);
            MiniItween.MoveTo(aIcon.gameObject, GetTeamIconLocalPos(list_Team.Count - 1), disappearTime, MiniItween.EasingType.EaseInQuint, false);

            for (int i = 1; i < list_Team.Count; i++)
            {
                MiniItween.MoveTo(list_Team[i].gameObject, GetTeamIconLocalPos(i - 1), disappearTime, MiniItween.EasingType.EaseInQuint, false).b_handleScaleTime = true;
            }

            aIcon.toDie();
            list_Team.RemoveAt(0);
            list_Team.Add(aIcon);
            ReadRoleNum(getAliveCount, list_Team.Count);  // yangchenguang 战斗队伍士兵显示字符串修改

            yield return(new WaitForSeconds(disappearTime));
        }
    }
Beispiel #12
0
    public void OneCoinDropAtPos(int coin)
    {
        int num = 5;

        if (coin > 50)
        {
            num = 10;
        }
        else if (coin > 20)
        {
            num = 7;
        }
        for (int i = 0; i < num; i++)
        {
            GameObject go = Instantiate(pbCoin) as GameObject;
            SDK.AddChild(go, _gameObject);

            Vector3 v3pos = new Vector3(Random.Range(-300, 300), -515, 0);
            go.transform.localPosition = v3pos;

            v3pos.y = Random.Range(50, 100);

            MiniItween it = MiniItween.MoveTo(go, v3pos, 0.4f, MiniItween.EasingType.Bounce3);
            it.myDelegateFuncWithObject += this.MoveEnd;
        }
    }
Beispiel #13
0
    IEnumerator AttackAction(bool LiftObj)
    {
        Screen_Brightness_ONOFF(true);
        if (Man_L != null && Man_R != null)
        {
            Man_L.HandleTypeAnim(CRLuoAnim_Main.Type.GoRush);
            Man_R.HandleTypeAnim(CRLuoAnim_Main.Type.GoRush);
            MiniItween.MoveTo(Man_GameObj_L, new Vector3(0, 0, -Long_Near), Fly_Time);
            MiniItween.MoveTo(Man_GameObj_R, new Vector3(0, 0, Long_Near), Fly_Time);
            yield return(new WaitForSeconds(Fly_Time));

            //强制到特定的位置
            Man_GameObj_L.transform.localPosition = new Vector3(0, 0, -Long_Near);
            Man_GameObj_R.transform.localPosition = new Vector3(0, 0, Long_Near);

            if (LiftObj)
            {
                Man_L.RivalOBJ   = Man_R;
                Man_R.RivalOBJ   = null;
                Man_R.SaveLife   = !KillYou;
                Man_L.Injure_Key = false;
                Man_L.HandleTypeAnim(CRLuoAnim_Main.Type.Attack);
            }
            else
            {
                Man_R.RivalOBJ   = Man_L;
                Man_L.RivalOBJ   = null;
                Man_L.SaveLife   = !KillYou;
                Man_R.Injure_Key = false;
                Man_R.HandleTypeAnim(CRLuoAnim_Main.Type.Attack);
            }
        }
    }
Beispiel #14
0
    void PlayThunder()
    {
        if (state == 1)
        {
            MiniItween.MoveTo(sprite_Attack.gameObject, Vector3.zero, 0.1f);

            Vector3 localPos = sprite_Defense.transform.localPosition;
            Vector3 toPos    = new Vector3(localPos.x + MoveDistance, localPos.y, localPos.z);
            MiniItween.MoveTo(sprite_Defense.gameObject, toPos, 0.1f, MiniItween.EasingType.EaseInQuad);
            MiniItween.ColorTo(sprite_Defense.gameObject, new V4(new Color(1.0f, 1.0f, 1.0f, 0.0f)), 0.1f, MiniItween.Type.ColorWidget);
        }
        else if (state == -1)
        {
            MiniItween.MoveTo(sprite_Defense.gameObject, Vector3.zero, 0.1f);

            Vector3 localPos = sprite_Attack.transform.localPosition;
            Vector3 toPos    = new Vector3(localPos.x - MoveDistance, localPos.y, localPos.z);
            MiniItween.MoveTo(sprite_Attack.gameObject, toPos, 0.1f, MiniItween.EasingType.EaseInQuad);
            MiniItween.ColorTo(sprite_Attack.gameObject, new V4(new Color(1.0f, 1.0f, 1.0f, 0.0f)), 0.1f, MiniItween.Type.ColorWidget);
        }

        GameObject thunder = GameObject.Instantiate(Go_Thunder) as GameObject;

        thunder.transform.parent        = gameObject.transform;
        thunder.transform.localPosition = Vector3.zero;

        Invoke("ZoomOut", 1.5f);
    }
Beispiel #15
0
    void StepFive()
    {
        GameObject obj_4     = spAni[4].gameObject;
        Vector3    targetPos = new Vector3(436, 159, 0);

        MiniItween.MoveTo(obj_4, targetPos, 0.8f);
        MiniItween.ColorTo(obj_4, new V4(Color.white), 0.7f, MiniItween.Type.ColorWidget);
    }
    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);
    }
	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;
		
	}
    void OnMoveToTarget()
    {
        lblTimeEffect.GetComponent <TweenScale> ().onFinished.Clear();

        MiniItween.MoveTo(lblTimeEffect.gameObject, timerLabelPos, 0.8f);
        TweenScale.Begin(lblTimeEffect.gameObject, 0.8f, Vector3.one);
        setTimeBoxEffect = true;

        lblTimeEffect.GetComponent <TweenScale> ().onFinished.Add(new EventDelegate(this, "SetShowBoxEffect"));
    }
Beispiel #19
0
    //人物消失
    IEnumerator DisappearRole()
    {
        MiniItween.MoveTo(LeftRole.gameObject, new Vector3(-hideDis, 0f, 0f), QuitTimeRole);
        MiniItween.MoveTo(RightRole.gameObject, new Vector3(hideDis, 0f, 0f), QuitTimeRole);

        yield return(new WaitForSeconds(QuitTimeRole));

        bgAnim.AnimationEndDelegate = null;
        bgAnim.Reverse();
    }
Beispiel #20
0
    void GeneratePieceMesh(BanCartoonPiece aPiece, int index)
    {
        GameObject temp = new GameObject("CartoonPiece:" + index);

        float size = targetCamera.orthographicSize * 2;

        switch (aPiece.type)
        {
        case BanCartoonPiece.Type.None:
            temp.transform.position = this.transform.position;
            break;

        case BanCartoonPiece.Type.Left:
            temp.transform.position = this.transform.position + Vector3.left * size * widthByHeight;
            break;

        case BanCartoonPiece.Type.Right:
            temp.transform.position = this.transform.position + Vector3.right * size * widthByHeight;
            break;

        case BanCartoonPiece.Type.Up:
            temp.transform.position = this.transform.position + Vector3.up * size;
            break;

        case BanCartoonPiece.Type.Down:
            temp.transform.position = this.transform.position + Vector3.down * size;
            break;
        }

        MiniItween.MoveTo(temp, this.transform.position, f_PieceFlyTime, MiniItween.EasingType.EaseOutQuart, true);

        Mesh tempMesh = new Mesh();

        tempMesh.vertices = new Vector3[] {
            new Vector3(aPiece.pos_1.x * widthByHeight, aPiece.pos_1.y, 0),
            new Vector3(aPiece.pos_2.x * widthByHeight, aPiece.pos_2.y, 0),
            new Vector3(aPiece.pos_3.x * widthByHeight, aPiece.pos_3.y, 0),
            new Vector3(aPiece.pos_4.x * widthByHeight, aPiece.pos_4.y, 0)
        };
        tempMesh.triangles = new int[] { 0, 1, 2, 0, 2, 3 };
        tempMesh.uv        = new Vector2[] {
            aPiece.uv_1,
            aPiece.uv_2,
            aPiece.uv_3,
            aPiece.uv_4
        };
        temp.AddComponent <MeshFilter>().mesh       = tempMesh;
        temp.AddComponent <MeshRenderer>().material = material;
        material.mainTexture      = texture;
        temp.transform.localScale = targetCamera.orthographicSize * 2 * Vector3.one;
        temp.transform.parent     = this.transform;

        list_Piece.Add(temp);
    }
Beispiel #21
0
 public static void EaseEffect(GameObject inObj, GameObject outObj)
 {
     if (outObj != null)
     {
         MiniItween.MoveTo(outObj, Vector3.right * 100, 0.3f, MiniItween.EasingType.EaseOutQuart, false);
     }
     if (inObj != null)
     {
         MiniItween.MoveTo(inObj, Vector3.zero, 0.5f, MiniItween.EasingType.EaseOutQuart, false);
     }
 }
Beispiel #22
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); };
    }
Beispiel #23
0
 void Replace()
 {
     NGUITools.SetActive(sprite_KeZhi.gameObject, false);
     if (state == 1)
     {
         MiniItween.MoveTo(sprite_Attack.gameObject, Vector3.zero + OverDistance, 0.1f).myDelegateFunc += PlayThunder;
     }
     else if (state == -1)
     {
         MiniItween.MoveTo(sprite_Defense.gameObject, Vector3.zero - OverDistance, 0.1f).myDelegateFunc += PlayThunder;
     }
 }
 void ShowDiaEffect()
 {
     MiniItween.MoveTo(coinObj.gameObject, coinObj.transform.localPosition + upLength * Vector3.up, 0.8f);
     MiniItween.MoveTo(diaObj.gameObject, diaObj.transform.localPosition + upLength * Vector3.up, 0.8f);
     MiniItween.ColorTo(coinObj.gameObject, new V4(1, 1, 1, 0), 0.8f, MiniItween.Type.Color);
     MiniItween.ColorTo(diaObj.gameObject, new V4(1, 1, 1, 0), 0.8f, MiniItween.Type.Color);
     MiniItween.ColorTo(txt_Coin[1].gameObject, new V4(txtYellowColor.r, txtYellowColor.g, txtYellowColor.b, 0), 0.8f, MiniItween.Type.Color);
     MiniItween.ColorTo(txt_Dia[1].gameObject, new V4(txtYellowColor.r, txtYellowColor.g, txtYellowColor.b, 0), 0.8f, MiniItween.Type.Color);
     MiniItween.ColorTo(txt_Coin[0].gameObject, new V4(txtYellowColor.r, txtYellowColor.g, txtYellowColor.b, 0), 0.8f, MiniItween.Type.Color);
     MiniItween.ColorTo(txt_Dia[0].gameObject, new V4(txtYellowColor.r, txtYellowColor.g, txtYellowColor.b, 0), 0.8f, MiniItween.Type.Color).myDelegateFunc += HideEffect;
     Invoke("HideEffect", 1f);
 }
Beispiel #25
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));
    }
Beispiel #26
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);
        }
    }
Beispiel #27
0
    IEnumerator DoMove(float delayTime, Vector3 v3, float animTime, MiniItween.EasingType animType, bool PosSelf)
    {
        yield return(new WaitForSeconds(delayTime));

        if (PosSelf)
        {
            MiniItween.MoveTo(this.gameObject, v3 + v3_OriginPos, animTime, animType, false);
        }
        else
        {
            MiniItween.MoveTo(this.gameObject, v3 + v3_OriginPos, animTime, animType, true);
        }
    }
Beispiel #28
0
 void Back()
 {
     if (state == 1)
     {
         Vector3 localPos = sprite_Attack.transform.localPosition;
         MiniItween.MoveTo(sprite_Attack.gameObject, new Vector3(localPos.x - 10f, localPos.y, localPos.z), 0.08f).myDelegateFunc += Replace;
     }
     else if (state == -1)
     {
         Vector3 localPos = sprite_Defense.transform.localPosition;
         MiniItween.MoveTo(sprite_Defense.gameObject, new Vector3(localPos.x + 10f, localPos.y, localPos.z), 0.08f).myDelegateFunc += Replace;
     }
 }
    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; };
    }
Beispiel #30
0
    void  ShowEffect()
    {
        //   gameObject.transform.localScale = Vector3.one;
        TweenScale.Begin(gameObject, 0.1f, Vector3.one);
        MiniItween.MoveTo(gameObject, new Vector3(startPos.x, startPos.y + height, startPos.z), duration / 1.4f);//.myDelegateFunc += OnDestory;

        if (gameObject.GetComponent <TweenAlpha>() == null)
        {
            gameObject.AddComponent <TweenAlpha>();
        }

        TweenAlpha.Begin(gameObject, duration / 1.2f, 0f).onFinished.Add(new EventDelegate(this, "OnDestory"));//+=OnDestory;
    }