Ejemplo n.º 1
0
        void _spell_StartUseSpell(object sender, EventArgs e)
        {
            _counter             = 0;
            C_Culdaun.Visibility = Windows.UI.Xaml.Visibility.Visible;
            if (Spell.Duration != 0)
            {
                C_Timer.Text       = Spell.Duration.ToString();
                C_Timer.Visibility = Windows.UI.Xaml.Visibility.Visible;
            }

            _mouveTimerCuldaun = new DispatcherTimer()
            {
                Interval = TimeSpan.FromSeconds(1)
            };
            _mouveTimerCuldaun.Tick += mouveTimerCuldaun_Tick;
            _mouveTimerCuldaun.Start();

            St_Culdaun.Duration = TimeSpan.FromSeconds(_spell.Culdaun);
            foreach (var item in St_Culdaun.Children)
            {
                DoubleAnimationUsingKeyFrames da = item as DoubleAnimationUsingKeyFrames;
                if (da != null)
                {
                    da.KeyFrames[1].KeyTime = TimeSpan.FromSeconds(_spell.Culdaun);
                    da.Duration             = TimeSpan.FromSeconds(_spell.Culdaun);
                }
            }
            St_Culdaun.Begin();
        }
Ejemplo n.º 2
0
        public void StopPause()
        {
            if (_mouveTimerCuldaun != null)
            {
                _mouveTimerCuldaun.Start();
            }

            St_Culdaun.Resume();
        }
Ejemplo n.º 3
0
        public void Pause()
        {
            if (_mouveTimerCuldaun != null)
            {
                _mouveTimerCuldaun.Stop();
            }

            St_Culdaun.Pause();
        }