예제 #1
0
        public LevelBuilder(Level currentLevel)
        {
            level = currentLevel;
            factory = new SpriteFactory();
            tileFactory = new TileFactory();
            grassFactory = new GrassFactory();
            ledgeFactory = new LedgeFactory();
            buildingFactory = new BuildingFactory();
            enemyFactory = new EnemyFactory();

            // trees
            tileDictionary.Add("W", TileFactory.TileType.treeTile);

            // pokecenter parts
            tileDictionary.Add("3", TileFactory.TileType.pokeEndCornerLeft);
            tileDictionary.Add("6", TileFactory.TileType.pokeEndCornerRight);
            tileDictionary.Add("1", TileFactory.TileType.pokeEndCounterLeft);
            tileDictionary.Add("8", TileFactory.TileType.pokeEndCounterRight);
            tileDictionary.Add("4", TileFactory.TileType.pokeHorizontal);
            tileDictionary.Add("5", TileFactory.TileType.pokeMiddleSection);
            tileDictionary.Add("2", TileFactory.TileType.pokeVerticalLeft);
            tileDictionary.Add("7", TileFactory.TileType.pokeVerticalRight);

            tileDictionary.Add("0", TileFactory.TileType.pokeFloorSpot);
            tileDictionary.Add("t", TileFactory.TileType.pokeTree);
            tileDictionary.Add("y", TileFactory.TileType.pokeBookShelf);
            tileDictionary.Add("u", TileFactory.TileType.pokeComputer);
            tileDictionary.Add("i", TileFactory.TileType.pokeStairsDown);
            tileDictionary.Add("o", TileFactory.TileType.pokeChairs);
            tileDictionary.Add("q", TileFactory.TileType.pokeFloorPrint);

            // grass
            grassDictionary.Add("G", GrassFactory.GrassType.shortGrass);

            // ledges
            ledgeDictionary.Add("M", LedgeFactory.LedgeType.ledgeMiddle);
            ledgeDictionary.Add("R", LedgeFactory.LedgeType.ledgeRightEnd);
            ledgeDictionary.Add("L", LedgeFactory.LedgeType.ledgeLeftEnd);

            // buildings
            buildingDictionary.Add("I", BuildingFactory.BuildingType.pokeCenterLeft);
            buildingDictionary.Add("O", BuildingFactory.BuildingType.pokeCenterRight);

            // npcs
            enemyDictionary.Add("E", EnemyFactory.EnemyType.rival);
            enemyDictionary.Add("Q", EnemyFactory.EnemyType.girl);

            // exits
            exitDictionary.Add("B", SpriteFactory.sprites.exit);

            // random
            tileDictionary.Add("p", TileFactory.TileType.sign);
        }
예제 #2
0
        public LevelBuilder(Level currentLevel)
        {
            level           = currentLevel;
            factory         = new SpriteFactory();
            tileFactory     = new TileFactory();
            grassFactory    = new GrassFactory();
            ledgeFactory    = new LedgeFactory();
            buildingFactory = new BuildingFactory();
            enemyFactory    = new EnemyFactory();

            // trees
            tileDictionary.Add("W", TileFactory.TileType.treeTile);

            // pokecenter parts
            tileDictionary.Add("3", TileFactory.TileType.pokeEndCornerLeft);
            tileDictionary.Add("6", TileFactory.TileType.pokeEndCornerRight);
            tileDictionary.Add("1", TileFactory.TileType.pokeEndCounterLeft);
            tileDictionary.Add("8", TileFactory.TileType.pokeEndCounterRight);
            tileDictionary.Add("4", TileFactory.TileType.pokeHorizontal);
            tileDictionary.Add("5", TileFactory.TileType.pokeMiddleSection);
            tileDictionary.Add("2", TileFactory.TileType.pokeVerticalLeft);
            tileDictionary.Add("7", TileFactory.TileType.pokeVerticalRight);

            tileDictionary.Add("0", TileFactory.TileType.pokeFloorSpot);
            tileDictionary.Add("t", TileFactory.TileType.pokeTree);
            tileDictionary.Add("y", TileFactory.TileType.pokeBookShelf);
            tileDictionary.Add("u", TileFactory.TileType.pokeComputer);
            tileDictionary.Add("i", TileFactory.TileType.pokeStairsDown);
            tileDictionary.Add("o", TileFactory.TileType.pokeChairs);
            tileDictionary.Add("q", TileFactory.TileType.pokeFloorPrint);

            // grass
            grassDictionary.Add("G", GrassFactory.GrassType.shortGrass);

            // ledges
            ledgeDictionary.Add("M", LedgeFactory.LedgeType.ledgeMiddle);
            ledgeDictionary.Add("R", LedgeFactory.LedgeType.ledgeRightEnd);
            ledgeDictionary.Add("L", LedgeFactory.LedgeType.ledgeLeftEnd);

            // buildings
            buildingDictionary.Add("I", BuildingFactory.BuildingType.pokeCenterLeft);
            buildingDictionary.Add("O", BuildingFactory.BuildingType.pokeCenterRight);

            // npcs
            enemyDictionary.Add("E", EnemyFactory.EnemyType.rival);
            enemyDictionary.Add("Q", EnemyFactory.EnemyType.girl);

            // exits
            exitDictionary.Add("B", SpriteFactory.sprites.exit);

            // random
            tileDictionary.Add("p", TileFactory.TileType.sign);
        }