示例#1
0
        void Start()
        {
            //积分器初始化
            m_scoreRecorder = new ScoreRecorder();

            //获取小鸟控制器
            m_birdController = FindObjectOfType <BirdController>();

            //声音控制器
            m_audioManager = new AudioManager();
            m_audioManager.PlayBGMusic();

            m_gameBehaviours = new List <IGameBehaviour>();
            m_gameBehaviours.Add(m_audioManager);

            //UI初始化
            m_topView = new TopView();
            m_topView.InitPreLoadView();
            m_resultView = new ResultView();
            m_resultView.InitPreLoadView();


            //画布管理器
            bgSkyBehaviours = this.gameObject.AddComponent <BGSkyBehaviours>();
            m_pipesFactory  = new PipesFactory();
            //先创建一组管子
            m_pipesFactory.CreatePipeGroup();
        }