Exemplo n.º 1
0
 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();
 }
Exemplo n.º 2
0
 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
 }
Exemplo n.º 3
0
        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));
        }
Exemplo n.º 4
0
 public TwoFrameAnimation(TimeSpan switchEvery)
 {
     _timer = new LoopingTimer(switchEvery, () => Flag = !Flag);
 }