public static void Main(string[] args)
        {
            Initialize();

            //Game loop
            bool quitGame = false;

            while (!quitGame)
            {
                Update();

                Director.Instance.Update();
                Director.Instance.Render();
                UISystem.Render();

                Director.Instance.GL.Context.SwapBuffers();
                Director.Instance.PostSwap();
            }

            //Clean up after ourselves.
            bird.Dispose();
            foreach (Obstacle obstacle in obstacles)
            {
                obstacle.Dispose();
            }
            background.Dispose();

            Director.Terminate();
        }
Esempio n. 2
0
        public static void Main(string[] args)
        {
            air = 20;
            Initialize();
            score = 0;

            airLoss = new Timer();
            airLoss.Reset();

            //Game loop
            bool quitGame = false;

            while (!quitGame)
            {
                Update();

                Director.Instance.Update();
                Director.Instance.Render();
                UISystem.Render();

                Director.Instance.GL.Context.SwapBuffers();
                Director.Instance.PostSwap();
            }

            //Clean up after ourselves.
            bird.Dispose();
            foreach (Chain c in chain)
            {
                c.Dispose();
            }

            foreach (Bubble b in bubble)
            {
                b.Dispose();
            }

            background.Dispose();

            for (int i = 0; i < OBSTACLE_COUNT; i++)
            {
                seamine[i].Dispose();
                chain[i].Dispose();
            }

            Director.Terminate();
        }