Exemplo n.º 1
0
    public void complatephase(string str)
    {
        if (str == "ok")
        {
            if (animationPoint.transform.childCount == 0)
            {
                passObj _obj = MonoBase.Create3Dobj("Effect/UiEffect/battleAnim");
                _obj.obj.transform.parent        = animationPoint.transform;
                _obj.obj.transform.localPosition = Vector3.zero;
                _obj.obj.transform.localScale    = Vector3.one;
                BattleAnimCtrl battleAnimCtrl = _obj.obj.GetComponent <BattleAnimCtrl>();
                battleAnimCtrl.succese.transform.localPosition = Vector3.zero;
                battleAnimCtrl.succese.SetActive(true);
            }
            else
            {
                BattleAnimCtrl battleAnimCtrl = animationPoint.transform.GetChild(0).GetComponent <BattleAnimCtrl>();
                battleAnimCtrl.succese.transform.localPosition = Vector3.zero;
                battleAnimCtrl.succese.SetActive(true);
            }
            this.magicWeapon = StorageManagerment.Instance.getMagicWeapon(magicWeapon.uid);

            updateUI();
            Invoke("playAnimationOver", 2f);
        }
        else if (str == "evo_failed")
        {
            if (animationPoint.transform.childCount == 0)
            {
                passObj _obj = MonoBase.Create3Dobj("Effect/UiEffect/battleAnim");
                _obj.obj.transform.parent        = animationPoint.transform;
                _obj.obj.transform.localPosition = Vector3.zero;
                _obj.obj.transform.localScale    = Vector3.one;
                BattleAnimCtrl battleAnimCtrl = _obj.obj.GetComponent <BattleAnimCtrl>();
                battleAnimCtrl.fail.transform.localPosition = Vector3.zero;
                battleAnimCtrl.fail.SetActive(true);
            }
            else
            {
                BattleAnimCtrl battleAnimCtrl = animationPoint.transform.GetChild(0).GetComponent <BattleAnimCtrl>();
                battleAnimCtrl.fail.transform.localPosition = Vector3.zero;
                battleAnimCtrl.fail.SetActive(true);
            }
            magicWeapon.addSuccess += 10;

            updateUI();
            Invoke("playAnimationOver", 2f);
        }
    }
Exemplo n.º 2
0
 private void playFubenBattleAnim()
 {
     if (missionClearingPoint.transform.childCount == 0)
     {
         passObj _obj = MonoBase.Create3Dobj("Effect/UiEffect/battleAnim");
         _obj.obj.transform.parent        = missionClearingPoint.transform;
         _obj.obj.transform.localPosition = Vector3.zero;
         _obj.obj.transform.localScale    = Vector3.one;
         BattleAnimCtrl battleAnimCtrl = _obj.obj.GetComponent <BattleAnimCtrl> ();
         battleAnimCtrl.missionClearing.transform.localPosition = Vector3.zero;
         battleAnimCtrl.missionClearing.SetActive(true);
         missionClearingPoint.SetActive(true);
         missionClearing = battleAnimCtrl.missionClearing;
     }
 }
Exemplo n.º 3
0
 //显示胜利或者失败标语,竞技场决赛不管输赢默认播放胜利动画
 void playAnimBattleOver()
 {
     if (BattleManager.battleData.isLaddersRecord || BattleManager.battleData.isMineralFightRecord || BattleManager.battleData.isOneOnOneBossFight || BattleManager.battleData.isLastBattleBossBattle)
     {
         return;
     }
     if (BattleManager.battleData.isArenaFinal)
     {
         return;
     }
     if (BattleManager.battleData.winnerID == TeamInfo.ENEMY_CAMP && !BattleManager.battleData.isArenaFinal)
     {
         MissionInfoManager.Instance.autoGuaji = false;
         passObj _obj = MonoBase.Create3Dobj("Effect/UiEffect/battleAnim");
         if (failAnimPoint.transform.childCount == 0)
         {
             _obj.obj.transform.parent        = failAnimPoint.transform;
             _obj.obj.transform.localPosition = Vector3.zero;
             _obj.obj.transform.localScale    = Vector3.one;
             BattleAnimCtrl battleAnimCtrl = _obj.obj.GetComponent <BattleAnimCtrl> ();
             if (BattleManager.battleData.isGodsWarGroupFight)
             {
                 battleAnimCtrl.lianShengZhongJie.transform.localPosition = Vector3.zero;
                 battleAnimCtrl.lianShengZhongJie.SetActive(true);
             }
             else
             {
                 battleAnimCtrl.battleFail.transform.localPosition = Vector3.zero;
                 battleAnimCtrl.battleFail.SetActive(true);
             }
             //battleAnimCtrl.battleFail.transform.localPosition = Vector3.zero;
             //battleAnimCtrl.battleFail.SetActive (true);
         }
     }
     else
     {
         passObj _obj = MonoBase.Create3Dobj("Effect/UiEffect/battleAnim");
         if (winAnimPoint.transform.childCount == 0)
         {
             _obj.obj.transform.parent        = winAnimPoint.transform;
             _obj.obj.transform.localPosition = Vector3.zero;
             _obj.obj.transform.localScale    = Vector3.one;
             BattleAnimCtrl battleAnimCtrl = _obj.obj.GetComponent <BattleAnimCtrl> ();
             battleAnimCtrl.battleWin.transform.localPosition = Vector3.zero;
             battleAnimCtrl.battleWin.SetActive(true);
         }
     }
 }