예제 #1
0
    // Use this for initialization
    void OnEnable()
    {
        GameObject bmGO = GameObject.FindWithTag("Music");

        m_pBeatMaster = bmGO.GetComponent <BeatMaster>();
        m_fSpeed      = m_pBeatMaster.getDiscoPeteSpeedDependingOnMusic();

        GameObject gmGO = GameObject.FindWithTag("GridMaster");

        m_pGridMaster = gmGO.GetComponent <GridMaster>();
        m_pGridMaster.SetDiscoPeteToStart();

        m_pBeatMaster.beatEvent += BeatMasterOnBeatEvent;
        m_pBeatMaster.onJumpChancePassedEvent += BeatMasterOnJumpChancePassedEvent;

        m_pAnimator = GetComponent <Animator>();
        m_pAnimator.SetFloat(JUMP_DURATION, m_fSpeed);
        m_pAnimator.SetFloat(SPEED, m_pBeatMaster.songInfo.Bps);

        GameObject lapGO = GameObject.FindWithTag("LevelAndPointMaster");

        m_pLevelAndPointMaster = lapGO.GetComponent <LevelAndPointBehaviour>();

        if (m_pLevelAndPointMaster == null)
        {
            Debug.Log("DiscoPeteBehaviour: LevelAndPointMaster not found!");
        }
    }
예제 #2
0
    private void ItlResetLevel()
    {
        m_bDiscoPeteCurrentlyDead = false;
        m_pDiscoPete.Reset();

        m_pGridMaster.Reset();
        m_pGridMaster.SetDiscoPeteToStart();

        m_pGUIMaster.HideText();
    }