示例#1
0
    public IEnumerator ShowAppearAnim()
    {
        yield return(new WaitForSeconds(0.2f));

        foreach (var monsterInfo in _MonsterShowDict.Values)
        {
            monsterInfo._AppearAnim.transform.position       = monsterInfo._MonsterModel.transform.position;
            monsterInfo._AppearAnim.transform.localPosition += new Vector3(0, 50, 0);
            monsterInfo._AppearAnim.gameObject.SetActive(true);
            monsterInfo._AppearAnim.PlayEffect();

            PlayerUISound(_BornSound, 1);

            yield return(new WaitForSeconds(0.4f));

            monsterInfo._MonsterModel.gameObject.SetActive(true);
            monsterInfo._MonsterModel.PlayIdle();
        }

        yield return(new WaitForSeconds(0.2f));

        foreach (var monsterInfo in _MonsterShowDict.Values)
        {
            monsterInfo._UIHPItem.gameObject.SetActive(true);
        }

        UIFightBox.HideOptMask();
    }
示例#2
0
    public IEnumerator MonsterSkillShow(List <DamageResult> damageResults)
    {
        ClearDamageShow();
        foreach (var damageResult in damageResults)
        {
            var   monInfo  = _MonsterShowDict[damageResult._TargetMotion];
            float animTime = monInfo._MonsterModel.PlayAttack();

            yield return(new WaitForSeconds(0.2f));

            if (damageResult._UseSkill is SkillDamage)
            {
                PlayerUISound(_ElimitAttackSound, 1);
            }
            else if (damageResult._UseSkill != null)
            {
                PlayerUISound(_ElimitSkillSound, 1);
            }
            yield return(new WaitForSeconds(animTime - 0.2f));

            _DmgTextNormal.transform.position       = _HPBar.transform.position;
            _DmgTextNormal.transform.localPosition += new Vector3(0, 10, 0);
            _DmgTextNormal.gameObject.SetActive(true);
            _DmgTextNormal.text = "-" + damageResult.DamageValue;

            UpdateSelfHPBar(damageResult._AfterHP);

            if (damageResult._SkillBallsResult != null)
            {
                UIFightBox.ShowMonsterBalls(damageResult._SkillBallsResult);
            }

            yield return(new WaitForSeconds(0.3f));

            ClearDamageShow();

            if (damageResult._AfterHP <= 0 && BattleField.Instance._RoleMotion.IsDied)
            {
                UIStageFail.ShowAsyn();
            }

            yield return(new WaitForSeconds(0.2f));
        }
        RefreshMonsterCD();

        GameCore.Instance.EventController.PushEvent(EVENT_TYPE.EVENT_LOGIC_MONSTER_SKILL_FINISH, this, null);
        UIFightBox.HideOptMask();
        RefreshOptRound();
    }
示例#3
0
    public void PassStage(StageMapRecord passStageMap)
    {
        List <AwardItem> awardList = new List <AwardItem>();

        _FightingStage = LogicManager.Instance.EnterStageInfo;
        var baseAward = AwardManager.AddAward(_FightingStage.StageRecord.AwardType[0], _FightingStage.StageRecord.AwardValue[0]);

        awardList.Add(baseAward);

        int starCnt = 0;

        for (int i = 0; i < 3; ++i)
        {
            if (_FightingStage.IsStarOn(i))
            {
                continue;
            }

            bool isGetStar = true;
            if (passStageMap._StarInfos.Count > i)
            {
                isGetStar = StarInfoBase.isCanGetStar(passStageMap._StarInfos[i]);
            }

            if (isGetStar)
            {
                StageDataPack.Instance.SetStageStar(_FightingStage.StageRecord.Id, i);

                var starAward = AwardManager.AddAward(_FightingStage.StageRecord.AwardType[i + 1], _FightingStage.StageRecord.AwardValue[i + 1]);
                awardList.Add(starAward);
            }
        }

        for (int i = 0; i < 3; ++i)
        {
            if (_FightingStage.IsStarOn(i))
            {
                ++starCnt;
            }
        }

        StageDataPack.Instance.SaveClass(true);
        UIFightBox.HideOptMask();
        UIStageSucess.ShowAsyn(_FightingStage.StageRecord, starCnt, awardList);

        WeaponDataPack.Instance.RefreshUnLock();
    }