public Handler(IGameSoundPlayer gameSoundPlayer, ICoinBox coinBox, IGame game, IActs acts) { _gameSoundPlayer = gameSoundPlayer; _coinBox = coinBox; _game = game; _acts = acts; }
public Handler(IGameStats gameStats, IGameSoundPlayer gameSoundPlayer, IPacMan pacman, IMediator mediator) { _gameStats = gameStats; _gameSoundPlayer = gameSoundPlayer; _pacman = pacman; _mediator = mediator; }
public BigPacChaseAct(IMediator mediator, IGameSoundPlayer gameSoundPlayer) { _mediator = mediator; _gameSoundPlayer = gameSoundPlayer; _finished = false; var justOffScreen = new Vector2(250, 140); _blinkyTimer = new EggTimer(4500.Milliseconds(), reverseChase); _pacTimer = new EggTimer(4750.Milliseconds(), () => { }); _pacMan = new AttractScenePacMan { Direction = Directions.Left }; _bigPacMan = new GeneralSprite(Vector2.Zero, new Size(31, 32), new Vector2(16, 16), new Vector2(488, 16), new Vector2(520, 16), 110.Milliseconds()) { Visible = false }; _blinky = new AttractGhost(GhostNickname.Blinky, Directions.Left); _pacPositions = new StartAndEndPos(justOffScreen, new Vector2(-70, justOffScreen.Y)); _blinkyPositions = new StartAndEndPos(justOffScreen + new Vector2(20, 0), new Vector2(-40, justOffScreen.Y)); }
public GhostTearAct(IGameSoundPlayer gameSoundPlayer, IMediator mediator) { _gameSoundPlayer = gameSoundPlayer; _mediator = mediator; _finished = false; //NextAct = nextAct; _stage = Stage.MovingBlinky; _animFrame = 0; _tearFrames = new[] { new Vector2(589, 98), new Vector2(609, 98), new Vector2(622, 98), new Vector2(636, 98), new Vector2(636, 98), new Vector2(636, 98), new Vector2(649, 98) }; _blinkyLookFrames = new[] { new Vector2(584, 113), new Vector2(600, 113) }; _blinkyTimer = new EggTimer(4500.Milliseconds(), blinkyCaught); _tearTimer = new LoopingTimer(500.Milliseconds(), () => { if (_stage == Stage.TearingBlinky) { updateTearAnimation(); } }); _lookTimer = new LoopingTimer(TimeSpan.MaxValue, () => { }); _pacTimer = new EggTimer(4750.Milliseconds(), () => { }); _pacMan = new AttractScenePacMan { Direction = Directions.Left }; _snagSprite = new GeneralSprite(_centerPoint, _tearSize, _tearOffset, _tearFrames[0]) { Visible = true }; _blinky = new AttractGhost(GhostNickname.Blinky, Directions.Left); _lookingBlinky = new NullSprite(); var justOffScreen = new Vector2(250, 140); _pacPositions = new StartAndEndPos(justOffScreen, new Vector2(-70, justOffScreen.Y)); _blinkyPositions = new StartAndEndPos(justOffScreen + new Vector2(120, 0), _centerPoint - new Vector2(10, 0)); }
public Handler(IMediator mediator, IGame game, IGameSoundPlayer gameSoundPlayer, IPacMan pacman, IGhostCollection ghostCollection) { _mediator = mediator; _game = game; _gameSoundPlayer = gameSoundPlayer; _pacman = pacman; _ghostCollection = ghostCollection; }
public PacManDyingAct(IMediator mediator, IGhostCollection ghostCollection, IGameSoundPlayer gameSoundPlayer, IPacMan pacman, IMaze maze) { _mediator = mediator; _ghostCollection = ghostCollection; _gameSoundPlayer = gameSoundPlayer; _pacman = pacman; _maze = maze; }
public Handler(IGameSoundPlayer gameSoundPlayer, IGameStats gameStats, IMediator mediator, IHaveTheMazeCanvases mazeCanvases) { _gameSoundPlayer = gameSoundPlayer; _gameStats = gameStats; _mediator = mediator; _mazeCanvases = mazeCanvases; }
public BigPacChaseAct(IMediator mediator, IGameSoundPlayer gameSoundPlayer) { _mediator = mediator; _gameSoundPlayer = gameSoundPlayer; _finished = false; var justOffScreen = new Vector2(250, 140); _blinkyTimer = new(4500.Milliseconds(), reverseChase); _pacTimer = new(4750.Milliseconds(), static () => { });
public Handler(IGame game, IGameStats gameStats, IGameSoundPlayer gameSoundPlayer, IMediator mediator, IGhostCollection ghostCollection) { _game = game; _gameStats = gameStats; _gameSoundPlayer = gameSoundPlayer; _mediator = mediator; _ghostCollection = ghostCollection; }
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(); }
public PlayerIntroAct(IMediator mediator, IGhostCollection ghostCollection, IGameStats gameStats, IGameSoundPlayer gameSoundPlayer, IPacMan pacman, IMaze maze, IGame game) { _mediator = mediator; _ghostCollection = ghostCollection; _gameStats = gameStats; _gameSoundPlayer = gameSoundPlayer; _pacman = pacman; _maze = maze; _game = game; }
public Game( IMediator mediator, IFruit fruit, IStatusPanel statusPanel, IScorePanel scorePanel, IGameSoundPlayer gameSoundPlayer, IHumanInterfaceParser input, IPacMan pacman) { _mediator = mediator; _fruit = fruit; _statusPanel = statusPanel; _scorePanel = scorePanel; _gameSoundPlayer = gameSoundPlayer; _input = input; _pacman = pacman; }
public Handler(IGameSoundPlayer gameSoundPlayer, IGhostCollection ghostCollection, IFruit fruit, IMaze maze, IPacMan pacman, IGame game, IActs acts, IGameStats gameStats, IHaveTheMazeCanvases mazeCanvases) { _gameSoundPlayer = gameSoundPlayer; _ghostCollection = ghostCollection; _fruit = fruit; _maze = maze; _pacman = pacman; _game = game; _acts = acts; _gameStats = gameStats; _mazeCanvases = mazeCanvases; }
public GameAct( ICoinBox coinBox, IMediator mediator, IHumanInterfaceParser input, IGameSoundPlayer gameSoundPlayer, IGameStats gameStats, IGhostCollection ghostCollection, IMaze maze, IPacMan pacman, IFruit fruit) { _coinBox = coinBox; _mediator = mediator; _input = input; _gameSoundPlayer = gameSoundPlayer; _gameStats = gameStats; _ghostCollection = ghostCollection; _maze = maze; _pacman = pacman; _fruit = fruit; }
public TornGhostChaseAct(IMediator mediator, IGameSoundPlayer gameSoundPlayer) { _mediator = mediator; _gameSoundPlayer = gameSoundPlayer; _finished = false; var justOffScreen = new Vector2(250, 140); _ghostTimer = new EggTimer(4500.Milliseconds(), reverseChase); _pacTimer = new EggTimer(4800.Milliseconds(), () => { }); _pacMan = new AttractScenePacMan { Direction = Directions.Left }; _worm = new GeneralSprite(Vector2.Zero, new Size(22, 11), new Vector2(11, 5.5f), new Vector2(594, 132), new Vector2(626, 132), 110.Milliseconds()) { Visible = false }; _blinky = new GeneralSprite(Vector2.Zero, new Size(14, 14), new Vector2(7.5f, 7.5f), new Vector2(618, 113), new Vector2(634, 113), 110.Milliseconds()); _pacPositions = new StartAndEndPos(justOffScreen, new Vector2(-70, justOffScreen.Y)); _ghostStartAndEndPos = new StartAndEndPos(justOffScreen + new Vector2(50, 0), new Vector2(-40, justOffScreen.Y)); }
public Handler(IGameSoundPlayer gameSoundPlayer) { _gameSoundPlayer = gameSoundPlayer; }
public Handler(IGame game, IGameStats gameStats, IGameSoundPlayer gameSoundPlayer) { _game = game; _gameStats = gameStats; _gameSoundPlayer = gameSoundPlayer; }
public AttractAct( ICoinBox coinBox, IMediator mediator, IHumanInterfaceParser input, IGameSoundPlayer gameSoundPlayer) { string version = Assembly .GetEntryAssembly() ?.GetCustomAttribute <AssemblyInformationalVersionAttribute>() ?.InformationalVersion ?? "??"; MarqueeText[] texts = { new() { Text = $"v{version}", YPosition = 195, TimeIdle = 1.Seconds(), TimeIn = 1.Seconds(), TimeStationary = 1.Seconds(), TimeOut = .5f.Seconds() }, new() { Text = "tap/space - 1 player", YPosition = 195, TimeIdle = 1.Seconds(), TimeIn = 2.Seconds(), TimeStationary = 2.Seconds(), TimeOut = 1.Seconds() }, new() { Text = "long press/2 - 2 players", YPosition = 195, TimeIdle = 0.Seconds(), TimeIn = 2.Seconds(), TimeStationary = 2.Seconds(), TimeOut = 1.Seconds() } }; _marquee = new(texts); _coinBox = coinBox; _mediator = mediator; _input = input; _gameSoundPlayer = gameSoundPlayer; _pacmanLogo = new(new(192, 25), new(36, 152), Vector2.Zero, new(456, 173)); _blazorLogo = new(); _instructions = new(); _startTime = TimeSpan.MinValue; _blinky = new(GhostNickname.Blinky, Direction.Right); _pinky = new(GhostNickname.Pinky, Direction.Right); _inky = new(GhostNickname.Inky, Direction.Right); _clyde = new(GhostNickname.Clyde, Direction.Right); _startTime = TimeSpan.MinValue; _chaseSubActReadyAt = 9.Seconds(); _chaseSubAct = new(); _lock = new(); }