Exemple #1
0
        public static void Main()
        {
            Resources.LoadResources();
            GameManager  dogMeatGame = new GameManager();
            ScreenOption screen      = new ScreenOption();

            screen.MenuScreen();

            //Run the game
            dogMeatGame.SetupGame();
            while (false == SwinGame.WindowCloseRequested())
            {
                dogMeatGame.Perform();
            }
            SwinGame.ReleaseAllResources();
        }
Exemple #2
0
 // Game performance
 public void Perform()
 {
     SwinGame.ProcessEvents();
     if (DogMeatData.GameData.Dog == null)                   // If player does't choose any characters (dog), the game will go back to menu screen
     {
         _screen.MenuScreen();
         SetupGame();
     }
     else
     {
         DogMeatData.GameData.Dog.Move();            // Move the dog
         Draw();                                     // Draw game stuff to the GUI
         DogMeatData.GameData.Dog.Skill();           // Dog skill
         UpdateGame();                               // Update the game in every seconds
         SwinGame.RefreshScreen(60);
     }
 }