Esempio n. 1
0
 public override void Initialize()
 {
     Scenes               = CreateSceneHandler();
     Scenes.Window        = WindowService.CreateWindow("test", new Vec2(100, 100), new Vec2(100, 100));
     Scenes.Canvas        = WindowService.CreateCanvas(Scenes.Window);
     Scenes.ContentLoader = WindowService.CreateContentLoader(Scenes.Canvas);
 }
Esempio n. 2
0
        public override void Initialize()
        {
            Random = new Random();

            KeyboardInputService.SetKeyAlias("Quit", SDL.SDL_Keycode.SDLK_ESCAPE);
            KeyboardInputService.SetKeyAlias("Left", SDL.SDL_Keycode.SDLK_LEFT);
            KeyboardInputService.SetKeyAlias("Right", SDL.SDL_Keycode.SDLK_RIGHT);

            Scenes = CreateSceneHandler();

            Scenes.Window        = WindowService.CreateWindow("Brakeout", new Vec2(100, 100), ScreenSize);
            Scenes.Canvas        = WindowService.CreateCanvas(Scenes.Window);
            Scenes.ContentLoader = WindowService.CreateContentLoader(Scenes.Canvas);
            Scenes.SetScene <GameScene>();
        }
Esempio n. 3
0
        public override void Initialize()
        {
            Logger.Log("Starting up the Game!");

            Random = new Random();

            KeyboardInputService.SetKeyAlias("Quit", SDL.SDL_Keycode.SDLK_ESCAPE);
            KeyboardInputService.SetKeyAlias("Left", SDL.SDL_Keycode.SDLK_LEFT);
            KeyboardInputService.SetKeyAlias("Right", SDL.SDL_Keycode.SDLK_RIGHT);
            KeyboardInputService.SetKeyAlias("Up", SDL.SDL_Keycode.SDLK_UP);
            KeyboardInputService.SetKeyAlias("Down", SDL.SDL_Keycode.SDLK_DOWN);
            KeyboardInputService.SetKeyAlias("Shoot", SDL.SDL_Keycode.SDLK_z);

            Scenes = CreateSceneHandler();

            Scenes.Window        = WindowService.CreateWindow("Space Invader", new Vec2(100, 100), ScreenSize);
            Scenes.Canvas        = WindowService.CreateCanvas(Scenes.Window);
            Scenes.ContentLoader = WindowService.CreateContentLoader(Scenes.Canvas);
            Scenes.SetScene <SpaceScene>();
        }