Update() public méthode

public Update ( ) : void
Résultat void
Exemple #1
0
        public void Update(GameTime gameTime)
        {
            //Érintés lekezelése
            currentTouchState = TouchPanel.GetState();

            while (TouchPanel.IsGestureAvailable)
            {
                var gesture = TouchPanel.ReadGesture();
                switch (gesture.GestureType)
                {
                case GestureType.DoubleTap:
                    break;

                case GestureType.Tap:
                    root.OnPress(new Point((int)gesture.Position.X, (int)gesture.Position.Y), false);
                    break;
                }
            }

            //egér lekezelése
            if (lastButtonState != Mouse.GetState().LeftButton)
            {
                root.OnPress(Mouse.GetState().Position, Mouse.GetState().LeftButton == ButtonState.Pressed);
                lastButtonState = Mouse.GetState().LeftButton;
            }
            else
            {
                root.OnHover(Mouse.GetState().Position, Mouse.GetState().LeftButton == ButtonState.Released);
            }
            root.Update(gameTime);
        }
Exemple #2
0
        public override void Update(GameTime theTime, GameState state, Vector2 parentPosition)
        {
            _positionAbsolute = _positionRelative + parentPosition;

            if (_buyTab != null)
            {
                _buyTab.Update(theTime);
            }
            if (_sellTab != null)
            {
                _sellTab.Update(theTime);
            }

            foreach (KeyValuePair <TradeType, ShopInventroyListView> pair in _tradeViews)
            {
                _tradeViews[pair.Key].Update(theTime, state);
            }
        }
 public override void Update(GameTime theTime, GameState state)
 {
     _decreaseQuantity.Update(theTime);
     _increaseQuantity.Update(theTime);
 }