Exemple #1
0
        private void Init()
        {
            boxDoorList = PointLists.boxDoorPointList();
            boxList     = PointLists.boxPointList();
            wallList    = PointLists.mapList(stage, '0');
            scaleList   = MazeList.WallList(stage);
            directionsInit();
            gState = GhostState.NORMAL;
            target = new Point();
            switch (color)
            {
            case GhostColor.BLUE:
                ghost = new Ghost(new Point(30, 28), Direction.UP);
                break;

            case GhostColor.PINK:
                ghost = new Ghost(new Point(26, 28), Direction.DOWN);
                break;

            case GhostColor.RED:
                ghost = new Ghost(new Point(26, 21), Direction.RIGHT);
                break;

            case GhostColor.YELLOW:
                ghost = new Ghost(new Point(22, 28), Direction.UP);
                break;
            }
            map          = new Map(scaleList);
            aStar        = new AStar(map);
            bestFirst    = new BestFirst(map);
            breadthFirst = new BreadthFirst(map);
            State        = GameState.GAMEOVER;
        }
Exemple #2
0
        private void Init()
        {
            boxDoorList = PointLists.boxDoorPointList();
            wallList    = PointLists.banPointList();
            boxList     = PointLists.boxPointList();
            directionsInit();

            switch (color)
            {
            case GhostColor.BLUE:
                ghost = new Ghost(new Point(31, 29), Direction.UP);
                break;

            case GhostColor.PINK:
                ghost = new Ghost(new Point(27, 29), Direction.DOWN);
                break;

            case GhostColor.RED:
                ghost = new Ghost(new Point(27, 22), Direction.RIGHT);
                break;

            case GhostColor.YELLOW:
                ghost = new Ghost(new Point(23, 29), Direction.UP);
                break;
            }

            State = GameState.GAMEOVER;
        }
Exemple #3
0
        private void Init()
        {
            wallList    = PointLists.banPointList();
            dotList     = PointLists.dotPointList();
            boxList     = PointLists.boxPointList();
            boxDoorList = PointLists.boxDoorPointList();
            bonusList   = PointLists.bonusPointList();

            State = GameState.GAMEOVER;

            score       = 0;
            PacmanDelay = 70;
        }
Exemple #4
0
 private void Init()
 {
     wallList         = PointLists.mapList(stage, '0');
     dotList          = PointLists.mapList(stage, '2');
     boxList          = PointLists.boxPointList();
     boxDoorList      = PointLists.boxDoorPointList();
     bonusList        = PointLists.mapList(stage, '8');
     fruit.fruitState = FruitState.EATEN;
     State            = GameState.GAMEOVER;
     AIFlagInit();
     score       = 0;
     PacmanDelay = stockPacmanDelay;
     GhostDelay  = stockGhostDelay;
 }