private void PlayCheckbox_CheckedChanged(object sender, EventArgs e) { if (PlayCheckbox.Checked) { txtEffectTotalTime.Enabled = txtEffectFrameCount.Enabled = FrameNumTextBox.Enabled = false; RemapAnimationButton.Enabled = FrameSpinner.Enabled = false; if (clip.Clip.NumFrames < 0) { return; } //Ah, the horribly imprecise timer. Oh well AnimTimer.Interval = (int)(1000.0 * clip.Clip.FrameTime); if (AnimTimer.Interval < 10) { AnimTimer.Interval = 10; } AnimTimer.Start(); } else { txtEffectTotalTime.Enabled = txtEffectFrameCount.Enabled = FrameNumTextBox.Enabled = true; RemapAnimationButton.Enabled = FrameSpinner.Enabled = true; AnimTimer.Stop(); } }
public void Disturb(DisturbType type, bool firstCircle, bool resistable) { if (!CheckDisturb(type, firstCircle, resistable)) { return; } if (m_State == SpellState.Casting) { if (!firstCircle && !Core.AOS && this is MagerySpell && ((MagerySpell)this).Circle == SpellCircle.First) { return; } m_State = SpellState.None; m_Caster.Spell = null; Caster.Delta(MobileDelta.Flags); OnDisturb(type, true); if (m_CastTimer != null) { m_CastTimer.Stop(); } if (m_AnimTimer != null) { m_AnimTimer.Stop(); } if (Core.AOS && m_Caster.Player && type == DisturbType.Hurt) { DoHurtFizzle(); } m_Caster.NextSpellTime = Core.TickCount + (int)GetDisturbRecovery().TotalMilliseconds; } else if (m_State == SpellState.Sequencing) { if (!firstCircle && !Core.AOS && this is MagerySpell && ((MagerySpell)this).Circle == SpellCircle.First) { return; } m_State = SpellState.None; m_Caster.Spell = null; Caster.Delta(MobileDelta.Flags); OnDisturb(type, false); Target.Cancel(m_Caster); if (Core.AOS && m_Caster.Player && type == DisturbType.Hurt) { DoHurtFizzle(); } } }
private void StopButton_Click(object sender, EventArgs e) { AnimTimer.Stop(); StopButton.Enabled = false; PlayButton.Enabled = true; UpdateLabels(); FrameTracker.Enabled = true; AnimPanel.Invalidate(); }
private void ButtonStop_Click(object sender, EventArgs e) { AnimTimer.Stop(); scene.ExpIsRunning = false; scene.ExpIsPaused = false; scene.render(); ExpTimer.Reset(); //timer_label.Text = "0.00 с"; ButtonPause.Text = "ПАУЗА"; UnlockInterface(); }
private void Auto_CheckedChanged(object sender, EventArgs e) { if (CenterAuto.Checked && !start) //старт таймера { AnimTimer.Start(); AnimTimer.Enabled = true; start = true; } else //стоп таймера { AnimTimer.Stop(); AnimTimer.Enabled = false; start = false; } }
public void Disturb(DisturbType type, bool firstCircle = true, bool resistable = false) { if (!CheckDisturb(type, firstCircle, resistable)) { return; } switch (State) { case SpellState.Casting when !firstCircle && this is MagerySpell && Circle == SpellCircle.First: { return; } case SpellState.Casting: { State = SpellState.None; Caster.Spell = null; OnDisturb(type, true); m_AnimTimer?.Stop(); Caster.NextSpellTime = Core.TickCount + (int)GetDisturbRecovery().TotalMilliseconds; break; } case SpellState.Sequencing when !firstCircle && this is MagerySpell && Circle == SpellCircle.First: { return; } case SpellState.Sequencing: { State = SpellState.None; Caster.Spell = null; OnDisturb(type, type == DisturbType.Movement); Target.Cancel(Caster); break; } } }
private void ButtonPause_Click(object sender, EventArgs e) { if (scene.ExpIsPaused) { AnimTimer.Start(); ExpTimer.Start(); scene.ExpIsPaused = false; ButtonPause.Text = "ПАУЗА"; } else { AnimTimer.Stop(); ExpTimer.Stop(); double time = ExpTimer.ElapsedMilliseconds / 1000.0; scene.wave1.t = time; scene.wave2.t = time; scene.wave3.t = time; scene.render(); scene.ExpIsPaused = true; ButtonPause.Text = "ПРОД."; } }
private void AnimStopButton_Click(object sender, EventArgs e) { AnimTimer.Stop(); AnimTimer.Enabled = false; }