Exemple #1
0
 private void UpdateIDrawableComponent(IDrawableComponent component)
 {
     if (component.isEnabled())
     {
         component.Update();
     }
 }
Exemple #2
0
        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);
        }
Exemple #3
0
        public override void Update(IGameTime gameTime)
        {
            _mainMenuStateGraphics.Update(this, gameTime);

            _textMenu.Update(gameTime);

            base.Update(gameTime);
        }
Exemple #4
0
 public override void Update(IGameTime gameTime)
 {
     _physicsComponent.Update(this, gameTime);
     _graphicsComponent.Update(this, gameTime);
 }
Exemple #5
0
        public override void Update(IGameTime gameTime)
        {
            _helpMainMenuStateGraphics.Update(this, gameTime);

            base.Update(gameTime);
        }