Esempio n. 1
0
 public void Update(float elapsed, ComFigureController controller)
 {
     if (Finished)
     {
         return;
     }
     _timer.Update(elapsed);
 }
Esempio n. 2
0
        public override void Update(float elapsedTime)
        {
            _cursorAnimatorTimer.Update(elapsedTime);

            if (_hasFocus)
            {
                _inputController.Update(Game.Keyboard, elapsedTime);
                _spriteText.Text = _inputController.CurrentText;
            }
        }
Esempio n. 3
0
    public void Update()
    {
        if (OnSwipe != null)
        {
            SwiperTimer.Update();
        }

        if (IsActive && OnDelta != null)
        {
            DetermineDelta();
        }
    }
Esempio n. 4
0
        private void DrawCarret(GameTime gameTime)
        {
            _carretTimer.Update(gameTime, gt => _renderCarret = !_renderCarret);

            if (_renderCarret)
            {
                var textSize   = this.Font.MeasureString(this.Value);
                var carretSize = this.Font.MeasureString("|").Y;
                var alignment  = this.Alignment.Align(this.Font.MeasureString(this.Value), this.InnerBounds);
                var pos        = new Vector2(
                    x: alignment.X + textSize.X,
                    y: alignment.Y + (textSize.Y / 2) - (carretSize / 2));

                _spriteBatch.Draw(
                    _carret,
                    new Rectangle(
                        (Int32)pos.X,
                        (Int32)pos.Y,
                        1,
                        (Int32)carretSize),
                    this.Color);
            }
        }
 // Update is called once per frame
 void Update()
 {
     timer.Update();
 }