Exemplo n.º 1
0
    public void Update(CanvasTimingInformation timing)
    {
        var elapsed = timing.ElapsedTime;

        _timer.Run(timing);
        _timeLeft -= elapsed;
        _timeLeftToStartFlashing -= elapsed;
    }
Exemplo n.º 2
0
    public async ValueTask <ActUpdateResult> Update(CanvasTimingInformation timing)
    {
        if (_finished)
        {
            return(ActUpdateResult.Finished);
        }

        _timer.Run(timing);

        await _pacman.Update(timing);

        await _ghostCollection.Update(timing);

        return(_finished ? ActUpdateResult.Finished : ActUpdateResult.Running);
    }
Exemplo n.º 3
0
        public async ValueTask <ActUpdateResult> Update(CanvasTimingInformation timing)
        {
            _blinkyTimer.Run(timing);
            _pacTimer.Run(timing);
            _tearTimer.Run(timing);
            _lookTimer.Run(timing);

            if (_stage == Stage.MovingBlinky)
            {
                lerpBlinky();
            }

            lerpPacMan();

            await _pacMan.Update(timing);

            await _blinky.Update(timing);

            await _lookingBlinky.Update(timing);

            await _snagSprite.Update(timing);

            return(_finished ? ActUpdateResult.Finished : ActUpdateResult.Running);
        }
Exemplo n.º 4
0
 public void Run(CanvasTimingInformation timing) => _timer.Run(timing);