示例#1
0
        public override void Update(GameTime elapsedTime)
        {
            base.Update(elapsedTime);
            var collapseValue = collapseAnim.CurrentValue;

            if (Collapsed)
            {
                collapseAnim.Direction = AnimationDirection.Forward;
                collapseAnim.Update(elapsedTime);
            }
            else
            {
                collapseAnim.Direction = AnimationDirection.Backward;
                collapseAnim.Update(elapsedTime);
            }

            if (Math.Abs(collapseValue - collapseAnim.CurrentValue) > 0.0005)
            {
                InvalidateLayout();
            }

            splitterBar.Update(elapsedTime);
            FirstPane?.Update(elapsedTime);
            SecondPane?.Update(elapsedTime);
        }
示例#2
0
        public void IsRunning_When_Direction_Forward_With_Delay()
        {
            lv.Direction = AnimationDirection.Forward;

            lv.Loop = AnimationLoop.NoLoop;
            lv.Update(new GameTime(TimeSpan.Zero, TimeSpan.FromSeconds(0.1)));
            lv.IsRunning.Should().Be(true);

            lv.Update(new GameTime(TimeSpan.Zero, TimeSpan.FromSeconds(5.1)));
            lv.IsRunning.Should().Be(true);

            lv.Update(new GameTime(TimeSpan.Zero, TimeSpan.FromSeconds(7.1)));
            lv.IsRunning.Should().Be(false);
        }
示例#3
0
 public override void Update(GameTime elapsedTime)
 {
     base.Update(elapsedTime);
     if (Visibility == Visibility.Visible)
     {
         rotationValue.Update(elapsedTime);
         fadeInAnim.Update(elapsedTime);
     }
 }
示例#4
0
        //----------------------------------------------------------------------
        public override void Update(float _fElapsedTime)
        {
            if (!mPressedAnim.IsOver)
            {
                mPressedAnim.Update(_fElapsedTime);
            }

            mScrollbar.Update(_fElapsedTime);
        }
示例#5
0
        //----------------------------------------------------------------------
        public override void Update(float _fElapsedTime)
        {
            if (!mPressedAnim.IsOver)
            {
                mPressedAnim.Update(_fElapsedTime);
            }

            mTooltip.EnableDisplayTimer = mbIsHovered;
            mTooltip.Update(_fElapsedTime);
        }
示例#6
0
        public override void Update(GameTime elapsedTime)
        {
            mushroomAnim.Update(elapsedTime);
            mushroomOpacityAnim.Update(elapsedTime);
            logoAnim.Update(elapsedTime);
            titleAnim.Update(elapsedTime);
            switchTimer.Update(elapsedTime);

            if (switchTimer.IsOver && !stateService.IsSwitching)
            {
                stateService.SwitchState(stateService.States[nextState]);
            }
        }
示例#7
0
            public void Update(float time)
            {
                lerpX.Update(time);
                lerpY.Update(time);

                if (ls == null)
                {
                    itemService.TraitFor(item, out ls);
                }

                if (ls != null)
                {
                    ls.Position = new DoublePoint(lerpX.CurrentValue, lerpY.CurrentValue);
                }
            }
示例#8
0
 public override void Update(GameTime elapsedTime)
 {
     base.Update(elapsedTime);
     pressedAnimation.Update(elapsedTime);
 }