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

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

        if (IsActive && OnDelta != null)
        {
            DetermineDelta();
        }
    }
예제 #4
0
파일: TextInput.cs 프로젝트: rettoph/Guppy
        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);
            }
        }
예제 #5
0
 // Update is called once per frame
 void Update()
 {
     timer.Update();
 }