Пример #1
0
    public void StartInGamePlay()
    {
        if (m_HeroInfo.IsDead == true)
        {
            return;
        }

        if (m_HuntState == eHuntSceneState.CountDown)
        {
            m_HuntState = eHuntSceneState.Hunting;

            //StartBackground();

            m_HeroInfo.PlayAnimation(eCharacterAnimState.Run, true);

            if (m_MonsterInfo != null)
            {
                foreach (CharacterMonster monster in m_MonsterInfo)
                {
                    //m_MonsterInfo[m_NowMonsterNum].IsPause = false;
                    monster.IsPause = false;
                }
                if (m_MonsterInfo[m_NowMonsterNum].IsDead == false && m_MonsterInfo[m_NowMonsterNum].IsMove == true)
                {
                    m_MonsterInfo[m_NowMonsterNum].PlayAnimation(eCharacterAnimState.Run, true);
                    m_MonsterInfo[m_NowMonsterNum].StartMoveMonster();
                }
                else if (m_MonsterInfo[m_NowMonsterNum].IsDead == false && m_MonsterInfo[m_NowMonsterNum].IsMove == false)
                {
                    m_MonsterInfo[m_NowMonsterNum].StopMoveMonster();
                    m_MonsterInfo[m_NowMonsterNum].PlayAnimation(eCharacterAnimState.Run, true);
                }
            }

            if (m_HeroInfo != null && m_HeroInfo.IsDead == false)
            {
                m_HeroInfo.IsPause = false;
                //m_HeroInfo.IsMove = true;
            }

            if (m_HeroInfo.IsMove == false)
            {
                StopBackground();
            }
            else if (m_HeroInfo.IsMove == true)
            {
                StartBackground();
            }
        }
    }
Пример #2
0
    IEnumerator StartCountDown()
    {
        m_HuntState = eHuntSceneState.CountDown;
        yield return(new WaitUntil(() => CustomSceneManager.Instance.m_SceneChanging == false));

        GameObject obj = ResourceManager.GetOBJSetPositionPrefab("PrefabCountDown",
                                                                 gameObject.transform.position.x, gameObject.transform.position.y + 390, gameObject.transform.position.z,
                                                                 gameObject.transform);
        CountDown count = obj.GetComponent <CountDown>();

        yield return(new WaitUntil(() => count.m_IsDone == true));

        StartInGamePlay();
    }
Пример #3
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);
        }
    }