public MessageBox(ScreenState screenState, TimedDialogue message, int timeout) : base(0, 0, 0, 0) { ScreenState = screenState; Message = message; Timer = new Timer(timeout); }
protected BattleIcon(StateOfBattle battle, Combatant receiver) { X = receiver.X; Y = receiver.Y; Color = Colors.WHITE; AnimationTimer = new Timer(ANIMATION_DURATION); }
public InitialState(Game game, Color splashScreenColor) : base(game) { _timer = new Time.Timer(2000); Color fullcolor = splashScreenColor; r = fullcolor.R; g = fullcolor.G; b = fullcolor.B; }
/// <summary> /// Tests the given timer. Must have not been started. /// </summary> private void TestTimer(Timer timer) { long elapsed1, elapsed2; int halfWait = (int)(timer.Timeout / 2); Assert.AreEqual(timer.TotalMilliseconds, 0); Assert.IsFalse(timer.IsUp); timer.Unpause(); SystemThread.Sleep(halfWait); Assert.IsFalse(timer.IsUp); SystemThread.Sleep(halfWait); Assert.IsTrue(timer.IsUp); Assert.IsTrue(timer.TotalMilliseconds >= timer.Timeout); timer.Reset(); Assert.IsFalse(timer.IsUp); SystemThread.Sleep(halfWait); Assert.IsFalse(timer.IsUp); SystemThread.Sleep(halfWait); Assert.IsTrue(timer.IsUp); timer.Reset(false); Assert.AreEqual(timer.TotalMilliseconds, 0); }
public void Show() { AnimationTimer = new Timer(State.PostBattleState.MS_PER_BAR_FILL / 3); Visible = true; }
public void Show(List<MateriaOrb> materiaList) { MateriaList = materiaList; AnimationTimer = new Timer(MillisecondsPerMateria * materiaList.Count); Visible = true; }