Ejemplo n.º 1
0
        private new void Awake()
        {
            base.Awake();
            mEngineLoop = new EngineLoop(this);
            PreloadManager.GetOrAlloc();

            DebugUtility.Log(LoggerTags.Engine, "EngineLoop Start Frame : {0}", Time.frameCount);
            //DebugUtility.Log(LoggerTags.Engine, "EngineLoop End Frame : {0}", Time.frameCount);
        }
Ejemplo n.º 2
0
        protected override void OnDestroy()
        {
            if (this.HasDestroyed())
            {
                return;
            }

            DebugUtility.Log(LoggerTags.Engine, "Engine::OnDestroy");
            base.OnDestroy();
            mEngineLoop.Dispose();
            mEngineLoop = null;
        }
Ejemplo n.º 3
0
        public UserInterface(ILogger logger, IFileSystem fileSystem, IEngineLoop engineLoop, bool noOnTop)
        {
            //Disable to prevent debugger from shutting down the game
            SDL.SDL_SetHint(SDL.SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING, "1");

            if (noOnTop)
            {
                SDL.SDL_SetHint(SDL.SDL_HINT_ALLOW_TOPMOST, "0");
            }

            SDL.SDL_SetHint(SDL.SDL_HINT_VIDEO_X11_XRANDR, "1");
            SDL.SDL_SetHint(SDL.SDL_HINT_VIDEO_X11_XVIDMODE, "1");

            SDL.SDL_Init(SDL.SDL_INIT_EVERYTHING);

            WindowManager = new WindowManager(logger, fileSystem, engineLoop);
        }
Ejemplo n.º 4
0
 public WindowManager(ILogger logger, IFileSystem fileSystem, IEngineLoop engineLoop)
 {
     _logger     = logger ?? throw new ArgumentNullException(nameof(logger));
     _fileSystem = fileSystem ?? throw new ArgumentNullException(nameof(fileSystem));
     _engineLoop = engineLoop ?? throw new ArgumentNullException(nameof(engineLoop));
 }