Пример #1
0
    private void GameOver()
    {
        m_UIManager.SetTextHelpActive(true); //
        m_PlayerManager.SetIsGameOver(true);
        StageManager.m_OnUpdate -= Update;   //시간 정지

        RoundEventInvoker.Core()
        .AppendCallBack(() => m_UIManager.UpdateHelpTextWaitingTimeCoinInsert(0))
        .Wait(2.0f)
        .AppendCallBack(() => m_UIManager.UpdateHelpTextWaitingTimeCoinInsert(5))
        .Wait(1.0f)
        .AppendCallBack(() => m_UIManager.UpdateHelpTextWaitingTimeCoinInsert(4))
        .Wait(1.0f)
        .AppendCallBack(() => m_UIManager.UpdateHelpTextWaitingTimeCoinInsert(3))
        .Wait(1.0f)
        .AppendCallBack(() => m_UIManager.UpdateHelpTextWaitingTimeCoinInsert(2))
        .Wait(1.0f)
        .AppendCallBack(() => m_UIManager.UpdateHelpTextWaitingTimeCoinInsert(1))
        .Wait(1.0f)
        .AppendCallBack(() => m_UIManager.UpdateHelpTextWaitingTimeCoinInsert(0, true))
        .Wait(1.0f)
        .AppendCallBack(() =>
        {
            SceneManager.LoadScene("LobbyScene");
        })
        .Run();
    }
Пример #2
0
 void Awake()
 {
     Manager.IsGameStarted = true;
     Screen.SetResolution(480, 800, false);
     ManagerPool.GetInstance();
     RoundEventInvoker.Init();
     DOTween.Init(null, true);
 }
Пример #3
0
    protected override IEnumerator MainPhase()
    {
        RoundEventInvoker.Core()
        .Wait(() => IsElapsedTime(5.0f))
        .Run();

        yield return(base.MainPhase());
    }
Пример #4
0
    ////// 구현 팁

    /*
     * -90도 왼쪽방향
     *  90도 오른쪽 방향
     *
     *  Point Top, Bottm 최대 4번 인덱스까지
     *  Point Left, Right 최대 8번 인덱스까지
     *
     *  edge 좌하단 우하단 좌상단 우상단 순임
     *
     *  m_PathHolderList의 0인덱스는 UpLoopHolder 1은 Down
     *
     *
     *  만약 begin조차 overriding 하게된다면 beginPhase에서 MainPhaseInit호출 해줘야함
     *  권장하진 않음.
     *
     *  begin과 end를 따로 만들게 될경우는
     *  1. 등장이벤트를 해당 라운드만 특별하게 바꿀때
     *  2. 특정 메세지를 라운드 시작전에 뛰우고싶을떄? 등등
     *  3. 특별한 이벤트를 하고싶을때
     */


    protected override IEnumerator MainPhase()
    {
        RoundEventInvoker.Core()
        .Wait(() => IsElapsedTime(5.0f))
        .AppendCallBack(() => SpawnPentagonMoveUpAndDown_Type_A(m_TopSpawnPoints[0], m_BottomTargetPoints[0]))
        .AppendCallBack(() => SpawnPentagonMoveUpAndDown_Type_A(m_TopSpawnPoints[1], m_BottomTargetPoints[1]))
        .Wait(() => IsElapsedTime(15.0f))
        .AppendCallBack(() => SpawnPentagonMoveUpAndDown_Type_A(m_TopSpawnPoints[3], m_BottomTargetPoints[3]))
        .AppendCallBack(() => SpawnPentagonMoveUpAndDown_Type_A(m_TopSpawnPoints[4], m_BottomTargetPoints[4]))
        .Wait(() => IsElapsedTime(25.0f))
        .AppendCallBack(() => SpawnPentagonMoveUpAndDown_Type_B(m_TopSpawnPoints[0], m_BottomTargetPoints[1]))
        .Wait(() => IsElapsedTime(26.0f))
        .AppendCallBack(() => SpawnPentagonMoveUpAndDown_Type_B(m_TopSpawnPoints[1], m_BottomTargetPoints[2]))
        .Wait(() => IsElapsedTime(27.0f))
        .AppendCallBack(() => SpawnPentagonMoveUpAndDown_Type_B(m_TopSpawnPoints[2], m_BottomTargetPoints[3]))
        .Wait(() => IsElapsedTime(28.0f))
        .AppendCallBack(() => SpawnPentagonMoveUpAndDown_Type_B(m_TopSpawnPoints[3], m_BottomTargetPoints[4]))
        .Wait(() => IsElapsedTime(29.0f))
        .AppendCallBack(() => SpawnPentagonMoveUpAndDown_Type_B(m_TopSpawnPoints[4], m_BottomTargetPoints[0]))
        .Wait(() => IsElapsedTime(29.0f))
        .AppendCallBack(() => SpawnPentagonMoveUpAndDown_Type_B(m_TopSpawnPoints[4], m_BottomTargetPoints[3]))
        .Wait(() => IsElapsedTime(30.0f))
        .AppendCallBack(() => SpawnPentagonMoveUpAndDown_Type_B(m_TopSpawnPoints[3], m_BottomTargetPoints[2]))
        .Wait(() => IsElapsedTime(31.0f))
        .AppendCallBack(() => SpawnPentagonMoveUpAndDown_Type_B(m_TopSpawnPoints[2], m_BottomTargetPoints[1]))
        .Wait(() => IsElapsedTime(32.0f))
        .AppendCallBack(() => SpawnPentagonMoveUpAndDown_Type_B(m_TopSpawnPoints[1], m_BottomTargetPoints[0]))
        .Wait(() => IsElapsedTime(33.0f))
        .AppendCallBack(() => SpawnPentagonMoveUpAndDown_Type_B(m_TopSpawnPoints[0], m_BottomTargetPoints[4]))
        .Wait(() => IsElapsedTime(40.0f))
        .AppendCallBack(() => SpawnCircleStaying_Type_A(m_TopSpawnPoints[0]))
        .AppendCallBack(() => SpawnCircleStaying_Type_A(m_TopSpawnPoints[4]))
        .Wait(() => IsElapsedTime(50.0f))
        .AppendCallBack(() => SpawnPentagonMoveUpAndDown_Type_C(m_EdgeSpawnPoints[0], m_EdgeTargetPoints[3], Quaternion.Euler(0, 0, 135.0f)))
        .AppendCallBack(() => SpawnPentagonMoveUpAndDown_Type_C(m_EdgeSpawnPoints[1], m_EdgeTargetPoints[2], Quaternion.Euler(0, 0, 225.0f)))
        .AppendCallBack(() => SpawnPentagonMoveUpAndDown_Type_C(m_EdgeSpawnPoints[2], m_EdgeTargetPoints[1], Quaternion.Euler(0, 0, 45.0f)))
        .AppendCallBack(() => SpawnPentagonMoveUpAndDown_Type_C(m_EdgeSpawnPoints[3], m_EdgeTargetPoints[0], Quaternion.Euler(0, 0, 315.0f)))
        .Wait(() => IsElapsedTime(60.0f))
        .AppendCallBack(() => SpawnCircleUpLoopFollowing())
        .Wait(() => IsElapsedTime(61.0f))
        .AppendCallBack(() => SpawnCircleUpLoopFollowing())
        .Wait(() => IsElapsedTime(62.0f))
        .AppendCallBack(() => SpawnCircleUpLoopFollowing())
        .Wait(() => IsElapsedTime(63.0f))
        .AppendCallBack(() => SpawnCircleUpLoopFollowing())
        .Wait(() => IsElapsedTime(64.0f))
        .AppendCallBack(() => SpawnCircleUpLoopFollowing())
        .Wait(() => TargetedEntityCount() == 0)
        .Wait(10.0f)
        .AppendCallBack(() => SpawnBoss())
        .Wait(() => m_TargetedEntityPool.ContainsKey("BOSS") == false)
        .Wait(2.0f)
        .AppendCallBack(() => m_IsMainLoopEnd = true)
        .Run();

        yield return(base.MainPhase());
    }
Пример #5
0
    private void SpawnPlayer()
    {
        m_UIManager.SetTextHelpActive(true);
        m_PlayerManager.SetIsDead(false);
        m_PlayerManager.SetIsInvincible(true);
        m_PlayerManager.SetIsUltimatable(false);

        RoundEventInvoker.Core()
        .AppendCallBack(() => m_UIManager.UpdateHelpTextWaitingTimeRespawn(3))
        .Wait(1.0f)
        .AppendCallBack(() => m_UIManager.UpdateHelpTextWaitingTimeRespawn(2))
        .Wait(1.0f)
        .AppendCallBack(() => m_UIManager.UpdateHelpTextWaitingTimeRespawn(1))
        .Wait(1.0f)
        .AppendCallBack(() =>
        {
            m_UIManager.SetTextHelpActive(false);
            GameObject playerObject = UnityEngine.Object.Instantiate(m_StageManager.m_PlayerPrefab, m_StageManager.m_PlayerSpawnPointTransform.position, m_StageManager.m_PlayerSpawnPointTransform.rotation);



            DOTween.Sequence()
            .Append(playerObject.transform.DOMove(m_StageManager.m_PlayerMovePeekPoint.transform.position, 2.0f))
            .Append(playerObject.transform.DOMove(m_StageManager.m_PlayerMoveEndPoint.transform.position, 1.0f))
            .AppendCallback(() =>
            {
                m_PlayerManager.SetIsPlayerLoaded(true);
                m_PlayerManager.SetPlayer(playerObject);
                m_PlayerManager.GetPlayerMaterial().DOKill();
                m_IsBeginEnd = true;

                Sequence sequence = DOTween.Sequence();
                for (int i = 0; i < 10; i++)
                {
                    sequence.Append(m_PlayerManager.GetPlayerMaterial().DOColor(m_PlayerManager.GetPlayerColor().Clone().SetA(0.0f), 0.05f));
                    sequence.Append(m_PlayerManager.GetPlayerMaterial().DOColor(m_PlayerManager.GetPlayerColor(), 0.05f));
                }
                sequence.AppendCallback(() => m_PlayerManager.SetIsUltimatable(true));
                sequence.AppendCallback(() => m_PlayerManager.SetIsInvincible(false));
                sequence.Play();
            });
        })
        .Run();
    }
Пример #6
0
    protected virtual IEnumerator EndPhase()
    {
        StageManager.m_OnUpdate -= Update;

        //라운드 정리
        //
        GameObject player = m_PlayerManager.GetPlayer();

        m_UIManager.GetTextHelp().gameObject.SetActive(true);
        TimeSpan span = GetElapsedTime();


        RoundEventInvoker.Core()
        .AppendCallBack(() =>
        {
            m_PlayerManager.SetIsPlayerLoaded(false);
            DOTween.Sequence()
            .Append(player.transform.DOBlendableMoveBy(new Vector3(0.0f, -5.0f, 0.0f), 3.0f))
            .Append(player.transform.DOBlendableMoveBy(new Vector3(0.0f, 200.0f, 0.0f), 5.0f));
        })
        .AppendCallBack(() => m_UIManager.UpdateHepTextRoundClear(span, 0))
        .Wait(1.0f)
        .AppendCallBack(() => m_UIManager.UpdateHepTextRoundClear(span, 3))
        .Wait(1.0f)
        .AppendCallBack(() => m_UIManager.UpdateHepTextRoundClear(span, 2))
        .Wait(1.0f)
        .AppendCallBack(() => m_UIManager.UpdateHepTextRoundClear(span, 1))
        .Wait(1.0f)
        .AppendCallBack(() => m_UIManager.UpdateHepTextRoundClear(span, 0, true))
        .Wait(1.0f)
        .AppendCallBack(() => m_IsCleared = true)
        .Run();


        yield return(null);
    }