Beispiel #1
0
    void TutorialProcess()
    {
        if (CMainData.getGameState() == GameData.GAME_STATE_READY)
        {
            startTime = 0.0f;
            m_lScore  = 0;
            m_sBoard.initBoards();
            CTimeManager.SetTimer();
            MainGame.g_Instance.setSoundState(SOUND_STATE.SOUND_STATE_GAME_INTRO_READY);

            CMainData.setGameState(GameData.GAME_STATE_GAMEING);
            m_nTutorialState = GameData.startTutorialStep;
        }
        else if (CMainData.getGameState() == GameData.GAME_STATE_GAMEING)
        {
            CheckControl();
            CheckEvent();
            TutorialMainProcess();
        }
        else if (CMainData.getGameState() == GameData.GAME_STATE_PAUSE)
        {
        }
        else if (CMainData.getGameState() == GameData.GAME_STATE_GAMEOVER)
        {
        }
        else if (CMainData.getGameState() == GameData.GAME_STATE_TIMEUP)
        {
            GameOverProcess();
        }

        PlayBGM();
    }
Beispiel #2
0
    void GameProcess()
    {
        if (CMainData.getGameState() == GameData.GAME_STATE_READY)
        {
            startTime = 0.0f;
            m_lScore  = 0;
            m_sBoard.initBoards();
            m_sBoard.makeStartDice();
            CTimeManager.SetTimer();

            if (gameSceneUI)
            {
                gameSceneUI.ChangeState(CMainData.getGameState());
            }

            CMainData.setGameState(GameData.GAME_STATE_START);
            CKeyManager.ControlOn();

            m_nTutorialState = TUTORIAL_STEP.TUTORIAL_STEP_NONE;
        }
        else if (CMainData.getGameState() == GameData.GAME_STATE_START)
        {
            processReadyUI();
        }
        else if (CMainData.getGameState() == GameData.GAME_STATE_GAMEING)
        {
            CheckControl();
            CheckEvent();
            CheckTimer();
            if (CheckBoard())
            {
                CMainData.setGameState(GameData.GAME_STATE_GAMEOVER);
            }
        }
        else if (CMainData.getGameState() == GameData.GAME_STATE_PAUSE)
        {
        }
        else if (CMainData.getGameState() == GameData.GAME_STATE_GAMEOVER)
        {
            GameOverProcess();
        }
        else if (CMainData.getGameState() == GameData.GAME_STATE_TIMEUP)
        {
            GameOverProcess();
        }

        PlayBGM();
    }
Beispiel #3
0
    void Start()
    {
        g_Instance = this;
        Application.runInBackground = true;
        if (Localization.instance != null)
        {
            // Localization 객체에게 언어를 바꾸라고 합니다.

            Debug.Log("Locale is " + CMainData.Locale);

            if (CMainData.Locale.Contains("ko"))
            {
                Localization.instance.currentLanguage = "korea";
            }
            else if (CMainData.Locale.Contains("ja"))
            {
                Localization.instance.currentLanguage = "japan";
            }
            else
            {
                Localization.instance.currentLanguage = "english";
            }
        }

        // 기존 Input

        /*
         *      Queue queue = new Queue();
         * m_EventQueue = Queue.Synchronized(queue);
         *      m_EventQueue.Clear();
         */

        m_oBoard  = GameObject.Find("Board");
        m_oCursor = GameObject.Find("Cursor");
        m_sBoard  = m_oBoard.GetComponent("Board") as Board;
        m_sCursor = m_oCursor.GetComponent("Cursor") as Cursor;
        m_oScore  = GameObject.Find("objScore");
        m_Star    = GameObject.Find("Star");
        m_Star2   = GameObject.Find("Star2");
        m_Arrow   = GameObject.Find("Arrow");
        m_Arrow2  = GameObject.Find("Arrow2");

        CTimeManager.SetTimer();
        if (CMainData.getGameMode() == GameData.GAME_MODE_BLITZ)
        {
            //Processing GameUI
            //CMainData.setGameState(GameData.GAME_STATE_PRE);
        }

        m_Star.SetActive(false);
        m_Arrow.SetActive(false);
        m_Star2.SetActive(false);
        m_Arrow2.SetActive(false);

        //TEST CODE : tutorial test
        //CMainData.setGameMode(GameData.GAME_MODE_TUTORIAL);
        /* ******************************************************* */

        if (CMainData.getGameMode() == GameData.GAME_MODE_TUTORIAL)
        {
            TutorialModeUI.SetActive(true);
            GameModeUI.SetActive(false);
        }
        else
        {
            TutorialModeUI.SetActive(false);
            GameModeUI.SetActive(true);
        }

        tutorialUI = TutorialModeUI.GetComponent("TutorialSceneUI") as TutorialSceneUI;
    }