Esempio 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();
        }
Esempio n. 2
0
        public void StopPause()
        {
            if (_mouveTimerCuldaun != null)
            {
                _mouveTimerCuldaun.Start();
            }

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

            St_Culdaun.Pause();
        }