Esempio n. 1
0
        public void Update()
        {
            if (m_manager_state != DrawableState.Finished)
            {
                if (m_currScene == null)
                {
                    m_currScene      = m_sceneQ.Dequeue(); // Grab the first animation
                    m_curr_scene_num = 0;
                }
                else if (m_currScene.Scene_State == DrawableState.Finished)
                {
                    if (m_sceneQ.Count == 0)      // Ran out of scenes to perform, reset stuff
                    {
                        m_currScene.ResetScene(); // So it wont stay finished for the next time around
                        m_manager_state  = DrawableState.Finished;
                        m_currScene      = null;
                        m_curr_scene_num = -1;
                        return;
                    }
                    else // On to the next animation
                    {
                        m_curr_scene_num++;
                        m_currScene.ResetScene(); // So it wont stay finished for the next time around
                        m_currScene = m_sceneQ.Dequeue();
                    }
                }

                // Update current Animation
                m_currScene.Update();
            }
        }
Esempio n. 2
0
        public void Reset()
        {
            wdog.Reset();
            sdog.Reset();
            sprdog.Reset();
            jdog1.Reset();
            jdog2.Reset();
            jdog3.Reset();

            m_intro.ResetScene();
            m_intro.Scene_State = DrawableState.Active;
            m_endround.Reset();

            m_paused       = false;
            m_played_intro = false;
            m_built_ending = false;

            m_clouds_p1 = new Clouds(0, clouds); //, debug);
            m_clouds_p2 = new Clouds(1, clouds); //, debug);
            m_clouds    = new Cloud[m_clouds_p1.CloudsA.Length * 2];

            m_clouds[0]  = m_clouds_p1.CloudsA[0];
            m_clouds[1]  = m_clouds_p1.CloudsA[1];
            m_clouds[2]  = m_clouds_p1.CloudsA[2];
            m_clouds[3]  = m_clouds_p1.CloudsA[0];
            m_clouds[4]  = m_clouds_p1.CloudsA[1];
            m_clouds[5]  = m_clouds_p1.CloudsA[2];
            m_clouds[6]  = m_clouds_p2.CloudsA[0];
            m_clouds[7]  = m_clouds_p2.CloudsA[1];
            m_clouds[8]  = m_clouds_p2.CloudsA[2];
            m_clouds[9]  = m_clouds_p2.CloudsA[0];
            m_clouds[10] = m_clouds_p2.CloudsA[1];
            m_clouds[11] = m_clouds_p2.CloudsA[2];

            m_ducks.Reset();
            m_player1.LoadContent(m_player_textures, m_num, m_score_fnt, boxrec);
            m_player2.LoadContent(m_player_textures, m_num, m_score_fnt, boxrec);
        }