private void GhostRerun() { score.ghost_start = 0; Rerun(blinky); blinky.StartMoving(); Rerun(pinky); Rerun(inky); Rerun(clyde); }
internal Task StartNewGame() { blinky = new GhostBlinky(); pinky = new GhostPinky(); clyde = new GhostClyde(); inky = new GhostInky(); _pacman.isMoving = false; _pacman.position_x = 1; _pacman.position_y = 1; _pacman.move_X = 0; _pacman.move_Y = 1; level = 1; _pacman.lifes = 3; score.coin_sum = 0; score.game_finish = 0; score.sum_bonus_coin = 0; CountDown(); eated_coin.Clear(); eated_energizer.Clear(); _pacman.isMoving = true; PacmanTimer.Change(0, 100); InkyTimer.Change(0, 120); ClydeTimer.Change(0, 120); PinkyTimer.Change(0, 120); BlinkyTimer.Change(0, 120); blinky.StartMoving(); _gameMap.RestorMap(); return(Task.CompletedTask); }
private void NextLevel() { blinky = new GhostBlinky(); pinky = new GhostPinky(); clyde = new GhostClyde(); inky = new GhostInky(); _pacman.isMoving = false; _pacman.position_x = 1; _pacman.position_y = 1; _pacman.move_X = 0; _pacman.move_Y = 1; _pacman.lifes++; level++; score.game_finish = 0; CountDown(); eated_coin.Clear(); eated_energizer.Clear(); _pacman.isMoving = true; PacmanTimer.Change(0, 100); InkyTimer.Change(0, 120); ClydeTimer.Change(0, 120); PinkyTimer.Change(0, 120); BlinkyTimer.Change(0, 120); blinky.StartMoving(); score.ghost_start = 0; _gameMap.RestorMap(); }