private void UpdateIDrawableComponent(IDrawableComponent component) { if (component.isEnabled()) { component.Update(); } }
public override void Update(IGameTime gameTime) { //ToDo move this logic out of the enemy classS if (_playerManager.Player != null) { if (Vector2.Distance(_playerManager.Player.Position, Position) < _aggroRange && Position.Y < _playerManager.Player.Position.Y && _playerManager.Player.Position.X >= Position.X - _aggroRange / 2 && _playerManager.Player.Position.X <= Position.X + _aggroRange / 2) { Target = _playerManager.Player; } else { Target = null; } } else { Target = null; } _physicsComponent.Update(this, gameTime); _graphicsComponent.Update(this, gameTime); _healthComponent.Update(this, gameTime); }
public override void Update(IGameTime gameTime) { _mainMenuStateGraphics.Update(this, gameTime); _textMenu.Update(gameTime); base.Update(gameTime); }
public override void Update(IGameTime gameTime) { _physicsComponent.Update(this, gameTime); _graphicsComponent.Update(this, gameTime); }
public override void Update(IGameTime gameTime) { _helpMainMenuStateGraphics.Update(this, gameTime); base.Update(gameTime); }