Exemple #1
0
 /// <summary>
 /// Allows the game to run logic such as updating the world,
 /// checking for collisions, gathering input, and playing audio.
 /// </summary>
 /// <param name="gameTime">Provides a snapshot of timing values.</param>
 protected override void Update(GameTime gameTime)
 {
     InputHandler();
     GraphicOptions.FrameLength = (float)gameTime.ElapsedGameTime.TotalSeconds;
     renderer.Update();
     //base.Update(gameTime);
 }
        private void ShowEntity(Entity e)
        {
            _selectionWindow.Hide();

            if (e != null)
            {
                if (_renderer != null)
                {
                    _renderer.Shutdown();
                }
                else
                {
                    _renderer                 = new EntityRenderer(e, World);
                    _renderer.Next.Click     += new EventHandler(Next_Click);
                    _renderer.Previous.Click += new EventHandler(Previous_Click);
                }
                _renderer.Update(e);
            }
        }
Exemple #3
0
 /// <summary>
 /// Updates the scene in a thread-safe way.
 /// </summary>
 /// <param name="time">Delta time (seconds).</param>
 public void Update(double time)
 {
     // TODO: Locking here causes deadlock.
     // Fix that, instead of using the cheap work-around.
     //lock (this)
     //{
     try
     {
         renderer.Update();
     }
     catch (Exception ex) {
         Console.Error.WriteLine(ex);
     }
     //}
 }
Exemple #4
0
 public void Update()
 {
     renderer.Update();
 }