Пример #1
0
		public Game(Root root, RenderWindow renderWindow)
		{
			_root = root;
			_renderWindow = renderWindow;
			_renderItems = new List<IRenderItem>();
			_context = this;
		}
Пример #2
0
		static void Main(string[] args)
		{
			IConfigurationManager ConfigurationManager = ConfigurationManagerFactory.CreateDefault();
			using (Root _root = new Root("game.log"))
			{
				ConfigurationManager.RestoreConfiguration(_root);
				if (ConfigurationManager.ShowConfigDialog(_root))
				{
					ConfigurationManager.SaveConfiguration(_root);

					using (RenderWindow _renderWindow = _root.Initialize(true, "Illisian.Niva"))
					{

						var game = new Game(_root, _renderWindow);
						WindowEventMonitor.Instance.RegisterListener(_renderWindow, game);
						game.OnLoad();
						game.CreateScene();
						_root.FrameRenderingQueued += game.OnRenderFrame;
						_root.FrameStarted += game.UpdateInput;
						_root.FrameStarted += game.UpdateOverlay;
						_root.FrameEnded += game.OnRenderFrameEnd;
						_root.StartRendering();

						game.OnUnload();
					}
				}

			}
		}