Ejemplo n.º 1
0
        public ValueTask Reset()
        {
            _startTime = TimeSpan.MinValue;
            _finished  = false;
            _instructions.Clear();
            _chaseSubAct = new ChaseSubAct();
            populateDelayedInstructions();

            return(default);
Ejemplo n.º 2
0
        public AttractAct(
            ICoinBox coinBox,
            IMediator mediator,
            IHumanInterfaceParser input,
            IGameSoundPlayer gameSoundPlayer)
        {
            MarqueeText[] texts =
            {
                new MarqueeText
                {
                    Text           = "tap or space for 1 player",
                    YPosition      = 195,
                    TimeIdle       = 1.Seconds(),
                    TimeIn         = 2.Seconds(),
                    TimeStationary = 2.Seconds(),
                    TimeOut        = 1.Seconds()
                },
                new MarqueeText
                {
                    Text           = "press or 2 for 2 players",
                    YPosition      = 195,
                    TimeIdle       = 0.Seconds(),
                    TimeIn         = 2.Seconds(),
                    TimeStationary = 2.Seconds(),
                    TimeOut        = 1.Seconds()
                }
            };

            _marquee         = new Marquee(texts);
            _coinBox         = coinBox;
            _mediator        = mediator;
            _input           = input;
            _gameSoundPlayer = gameSoundPlayer;
            _pacmanLogo      =
                new GeneralSprite(new Vector2(192, 25), new Size(36, 152), Vector2.Zero, new Vector2(456, 173));
            _blazorLogo = new BlazorLogo();

            _instructions = new List <Instruction>();

            _startTime = TimeSpan.MinValue;

            _blinky             = new SimpleGhost(GhostNickname.Blinky, Directions.Right);
            _pinky              = new SimpleGhost(GhostNickname.Pinky, Directions.Right);
            _inky               = new SimpleGhost(GhostNickname.Inky, Directions.Right);
            _clyde              = new SimpleGhost(GhostNickname.Clyde, Directions.Right);
            _startTime          = TimeSpan.MinValue;
            _chaseSubActReadyAt = 9.Seconds();

            _chaseSubAct = new ChaseSubAct();
            _lock        = new object();
        }