コード例 #1
0
ファイル: Engine.cs プロジェクト: TormentedEmu/OpenUO
        public Engine(IoCContainer container)
        {
            _container = container;
            #if DEBUG_REFERENCES
            SharpDX.Configuration.EnableObjectTracking = true;
            SharpDX.Configuration.EnableReleaseOnFinalizer = true;
            #endif
            IDeviceContextService deviceContextService = _container.Resolve<IDeviceContextService>();

            _form = deviceContextService.Form;
            _context = deviceContextService.Context;

            _form.Icon = Resources.openuo;
            _form.Text = string.Format("OpenUO v{0}", new AssemblyInfo(Assembly.GetEntryAssembly()).Version);
            _form.ResizeBegin += OnResizeBegin;
            _form.ResizeEnd += OnResizeEnd;
            _form.FormClosed += OnFormClosed;

            _updateState = new UpdateState();
            _gameTime = new GameTime();
            _world = new World(container);

            container.Resolve<IConsole>().WriteLine("Testing 123");

            _config = _container.Resolve<IConfiguration>();
            _updateChain = _container.Resolve<IChain<UpdateState>>();
            _worldRenderChain = _container.Resolve<IWorldRenderChain>();
            _uiRenderChain = _container.Resolve<IUIRenderChain>();

            _screenTarget = new DrawScreenTarget(_context);

            _updateChain.Freeze();
            _worldRenderChain.Freeze();
            _uiRenderChain.Freeze();
        }
コード例 #2
0
        public Engine(DrawingSurface drawingSurface)
        {
            RootControl = (Control)App.Current.RootVisual;

            Asserter.AssertIsNotNull(RootControl, "RootControl");
            Asserter.AssertIsNotNull(drawingSurface, "drawingSurface");

            _drawingSurface = drawingSurface;
            _content = new ContentManager(_gameServices);
            _content.RootDirectory = "Content";
            _totalGameTime = TimeSpan.Zero;
            _accumulatedElapsedGameTime = TimeSpan.Zero;
            _lastFrameElapsedGameTime = TimeSpan.Zero;
            _targetElapsedTime = TimeSpan.FromTicks(166667L);
            _drawState = new DrawState();
            _updateState = new UpdateState();
            _gameServices = new GameServiceContainer();
        }
コード例 #3
0
        private void Update(UpdateState state)
        {

        }
コード例 #4
0
 private void Update(UpdateState state)
 {
 }
コード例 #5
0
ファイル: Engine.cs プロジェクト: TormentedEmu/OpenUO
 protected virtual void Update(UpdateState state)
 {
     _updateChain.Execute(state);
 }
コード例 #6
0
 protected virtual void Update(UpdateState state)
 {
     _updateChain.Execute(state);
 }