Advertisement
Guest User

Untitled

a guest
May 4th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.58 KB | None | 0 0
  1. using Jump_n_Run_Testgame.Logic;
  2. using OpenTK_Tests;
  3. using OpenTK_Tests.Engine.Framework;
  4. using OpenTK_Tests.Engine.Logic;
  5. using OpenTK_Tests.Renderer;
  6. using OpenTK_Tests.Storage;
  7. using System;
  8. using System.Collections.Generic;
  9. using System.Globalization;
  10. using System.Linq;
  11. using System.Text;
  12. using System.Threading.Tasks;
  13.  
  14. namespace Jump_n_Run_Testgame
  15. {
  16.     public class Program
  17.     {
  18.         public static Logic_Menu logic_menu;
  19.         public static Logic_Game logic_game;
  20.  
  21.         public static Jump_n_Run_Testgame.Renderer.Renderer renderer;
  22.         private static MainGame mg;
  23.  
  24.        
  25.  
  26.         static void Main(string[] args)
  27.         {
  28.             mg = new MainGame("Space Invaders made in Kaindorf");
  29.  
  30.             loadResources();
  31.  
  32.             logic_menu = new Logic_Menu(mg);
  33.             logic_game = new Logic_Game(mg);
  34.             renderer = new Jump_n_Run_Testgame.Renderer.Renderer(mg);
  35.  
  36.             mg.onLogicChanged += mg_onLogicChanged;
  37.  
  38.             mg.Run(logic_menu, renderer);
  39.         }
  40.  
  41.         private static void loadResources()
  42.         {
  43.             foreach(var path in Properties.Resources.ResourceManager.GetResourceSet(CultureInfo.CurrentUICulture, true, true))
  44.             {
  45.                 if(path is string)
  46.                 {
  47.                     TextureStorage.LoadTexture((string)path);
  48.                 }
  49.             }
  50.         }
  51.  
  52.         private static void mg_onLogicChanged(object sender, OpenTK_Tests.Engine.Framework.Events.EventArgs.LR_ChangedArgs e)
  53.         {
  54.             //mg.reloadUIElements();
  55.         }
  56.  
  57.  
  58.     }
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement