Пример #1
0
    IEnumerator Smash()
    {
        m_HeroInfo.StopAnimation();
        m_HeroInfo.PlayAnimation(eCharacterAnimState.Smash, false);

        yield return(new WaitForSeconds(1.0f));

        int   AttackLevel = MainController.Instance.UserInfo.GetUserAbilityLevel(eHeroAbilityKind.ATTACK);
        float Attack      = MainController.Instance.GetHeroAbilityLevel(eHeroAbilityKind.ATTACK, AttackLevel).Effect;

        int   SmashLevel  = MainController.Instance.UserInfo.GetUserSkillLevel(eHeroSkillKind.SMASH);
        float smashEffect = MainController.Instance.GetHeroSkillLevel(eHeroSkillKind.SMASH, SmashLevel).Effect;

        double FinalDamage = Math.Truncate(Attack * (smashEffect / 100));

        m_BossInfo.AttackedByEnemies((int)FinalDamage, true);

        m_HeroInfo.m_State = eHeroState.Attack;
    }
Пример #2
0
    public void PauseInGamePlay()
    {
        if (m_HuntState == eHuntSceneState.Ready)
        {
            StopBackground();

            m_HeroInfo.PlayAnimation(eCharacterAnimState.Standing, true);
        }
        else if (m_HuntState == eHuntSceneState.Hunting && m_HeroInfo.IsDead == false)
        {
            m_HuntState = eHuntSceneState.Pause;

            StopBackground();

            if (m_MonsterInfo != null)
            {
                foreach (CharacterMonster monster in m_MonsterInfo)
                {
                    monster.IsPause = true;
                    monster.StopAnimation();
                    monster.StopMoveMonster();
                }
            }

            if (m_HeroInfo != null && m_HeroInfo.IsDead == false)
            {
                m_HeroInfo.IsPause = true;
                m_HeroInfo.StopAnimation();
            }
        }
        else if (m_HeroInfo.IsDead == true)
        {
            m_HuntState = eHuntSceneState.HeroDead;

            StopBackground();

            m_HeroInfo.PlayAnimation(eCharacterAnimState.Dead, false);
        }
    }