public StatusPanel(IGameStats gameStats, ICoinBox coinBox) { _gameStats = gameStats; _coinBox = coinBox; // ReSharper disable once HeapView.ObjectAllocation.Evident _timer = new LoopingTimer(250.Milliseconds(), () => _tickTock = !_tickTock); // ReSharper disable once HeapView.ObjectAllocation.Evident _fruit = new SimpleFruit(); }
public ScorePanel(IGameStats gameStats) { _gameStats = gameStats; // ReSharper disable HeapView.ObjectAllocation.Evident // ReSharper disable HeapView.DelegateAllocation _timer = new LoopingTimer(250.Milliseconds(), () => _tickTock = !_tickTock); _trialTimer = new LoopingTimer(2.Seconds(), () => _trialTickTock = !_trialTickTock); // ReSharper restore HeapView.DelegateAllocation // ReSharper restore HeapView.ObjectAllocation.Evident }
public Maze() { Visible = true; Origin = Vector2.Zero; _powerPill = new PowerPill(); _timer = new LoopingTimer(250.Milliseconds(), () => _tickTock = !_tickTock); _whiteMazeCanvas = new GeneralSprite( Vector2.Zero, _spritesheetSize, Vector2.Zero, new Vector2(228, 0)); }
public TwoFrameAnimation(TimeSpan switchEvery) { _timer = new LoopingTimer(switchEvery, () => Flag = !Flag); }