Esempio n. 1
0
        void reverseChase()
        {
            _blinkyTimer = new EggTimer(4600.Milliseconds(), () => { });

            _pacTimer = new EggTimer(4350.Milliseconds(), async() =>
            {
                _finished = true;
                await _mediator.Publish(new CutSceneFinishedEvent());
            });

            _pacMan.Visible    = false;
            _bigPacMan.Visible = true;

            var s    = new LevelStats(0);
            var sess = new GhostFrightSession(s.GetLevelProps());

            _blinky.Direction = new DirectionInfo(Directions.Right, Directions.Right);
            _blinky.SetFrightSession(sess);
            _blinky.SetFrightened();
            _blinkyPositions = _blinkyPositions.Reverse();

            var bigPacPos = _pacPositions.Reverse();

            bigPacPos = new StartAndEndPos(bigPacPos.Start - new Vector2(100, 0), bigPacPos.End);

            _pacPositions = bigPacPos;
        }
Esempio n. 2
0
    void reverseChase()
    {
        _ghostTimer = new(4600.Milliseconds(), async() =>
        {
            _finished = true;
            await _mediator.Publish(new CutSceneFinishedEvent());
        });

        _pacMan.Visible = false;
        _blinky.Visible = false;
        _worm.Visible   = true;

        _ghostStartAndEndPos = _ghostStartAndEndPos.Reverse();
    }
Esempio n. 3
0
        ValueTask reverseChase()
        {
            _powerPillToEat.Visible = false;
            _ghostTimer             = new EggTimer(12.Seconds(), () => { });
            _pacTimer = new EggTimer(6.Seconds(), () => { });

            var levelStats     = new LevelStats(0);
            var frightSessions = new GhostFrightSession(levelStats.GetLevelProps());

            foreach (var eachGhost in _ghosts)
            {
                eachGhost.Direction.Update(Directions.Right);
                eachGhost.SetFrightSession(frightSessions);
                eachGhost.SetFrightened();

                _ghostPositions[eachGhost.NickName] = _ghostPositions[eachGhost.NickName].Reverse();
            }

            _pacPositions = _pacPositions.Reverse();

            _pacMan.Direction = Directions.Right;

            return(default);