コード例 #1
0
ファイル: AnimationManager.cs プロジェクト: Dyn0mite/Pong
        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();
            }
        }
コード例 #2
0
ファイル: AnimationManager.cs プロジェクト: Dyn0mite/Pong
        public void Reset()
        {
            for (int i = 0; i < m_scenes.Length; i++)
            {
                m_sceneQ.Enqueue(m_sceneList[m_scenes[i]]);
            }

            m_currScene = m_sceneQ.Dequeue(); // Grab the first animation
        }
コード例 #3
0
ファイル: DuckPopulation.cs プロジェクト: Dyn0mite/Pong
        public void Reset()
        {
            m_built1              = false;
            m_built2              = false;
            m_duck_count          = 10;
            m_laughdog_anim       = new AnimatedSprite();
            m_flyawayduck_anim_1  = new AnimatedSprite(); // Flyaway Duck inter 1
            m_flyawayduck_anim_2  = new AnimatedSprite(); // Flyaway Duck inter 2
            m_flyaway_scn         = new AnimationScene();
            m_flyaway_scn_inter   = new AnimationScene();
            m_dog_laugh_scn_inter = new AnimationScene();
            m_intermission1       = new AnimationManager();
            m_intermission2       = new AnimationManager();
            m_counter_spr         = new Sprite();

            BuildAnimations();
            m_pongballs.Clear();
            m_pongballs.Add(BuildDuck(m_boundary));
            m_pongballs.Add(BuildDuck(m_boundary));
        }
コード例 #4
0
ファイル: DuckPopulation.cs プロジェクト: andressbarajas/Pong
        public void Reset()
        {
            m_built1 = false;
            m_built2 = false;
            m_duck_count = 10;
            m_laughdog_anim = new AnimatedSprite();
            m_flyawayduck_anim_1 = new AnimatedSprite();  // Flyaway Duck inter 1
            m_flyawayduck_anim_2 = new AnimatedSprite();  // Flyaway Duck inter 2
            m_flyaway_scn = new AnimationScene();
            m_flyaway_scn_inter = new AnimationScene();
            m_dog_laugh_scn_inter = new AnimationScene();
            m_intermission1 = new AnimationManager();
            m_intermission2 = new AnimationManager();
            m_counter_spr = new Sprite();

            BuildAnimations();
            m_pongballs.Clear();
            m_pongballs.Add(BuildDuck(m_boundary));
            m_pongballs.Add(BuildDuck(m_boundary));
        }
コード例 #5
0
ファイル: AnimationManager.cs プロジェクト: Dyn0mite/Pong
 public void AddScene(AnimationScene scene)
 {
     m_sceneList.Add(scene);
 }