Ejemplo n.º 1
0
        private void Update()
        {
            //Debug.LogWarning("m_system.update");
            if (m_system != null)
            {
                m_system.update(Time.deltaTime);
            }

            //Debug.LogWarning("FrameUpdate");
            if (m_Roll != null)
            {
                //m_Roll.FrameUpdate(Time.deltaTime);
                m_Roll.FrameUpdate(Time.deltaTime, (float)m_system.GetAccompanimentTime());
            }

            InputManager.GetInstance().Update();
            //纠正伴奏
            //Debug.Log("m_Roll.MusicPlayTime: " + m_Roll.m_MusicTime);

            if (Math.Abs((float)m_system.GetAccompanimentTime() - m_Roll.MusicPlayTime) > 0.1f)
            {
                m_system.SetAccompanimentTime(m_Roll.MusicPlayTime);
            }
            //end
            //Debug.LogWarning("MoveUpdate");
            //if(m_Player == null)
            //{
            //    Debug.LogWarning("m_Player is null");
            //}

            //m_Player.MoveUpdate(Time.deltaTime);

            //Debug.LogWarning("MoveUpdate ok");
            //test
            //if (Input.GetKeyDown(KeyCode.T))
            //{
            //    m_Roll.EnableGame(m_Player);
            //    m_Player.startMove();
            //}
            //if (Input.GetKeyDown(KeyCode.S))
            //{
            //    m_Roll.StopGame();
            //    m_Player.stopMove();
            //}
            //end
        }