Exemple #1
0
    public void Init(Level level)
    {
        m_onePointText.gameObject.SetActive(false);
        m_twoPointText.gameObject.SetActive(false);
        m_threePointText.gameObject.SetActive(false);
        m_missText.gameObject.SetActive(false);
        m_onePointTimer    = 0.0f;
        m_twoPointTimer    = 0.0f;
        m_threePointTimer  = 0.0f;
        m_missTimer        = 0.0f;
        m_win              = false;
        m_losses           = 0;
        m_previousAccuracy = -1;

        m_inputManager.Reset();
        m_startTouchPosition = new Vector2();
        m_touchPos           = new Vector2();
        m_points             = 0;

        m_currentLevel = level;

        m_currentSwipe = 0;

        UpdateTimeUntilNextSwipe();
        m_swipeManager.SetCurrentSwipeType(m_currentLevel.GetSwipe(m_currentSwipe), m_timeUntilNextSwipe);

        m_backgroundManager.SetNextBackground(m_currentLevel.GetBackgroundIndex(m_currentSwipe));
        m_backgroundManager.SetNextBackground(m_currentLevel.GetBackgroundIndex(m_currentSwipe + 1));
        m_audioManager.ResumeSong();
    }