コード例 #1
0
ファイル: LevelData.cs プロジェクト: xAlstrat/RPGForBlindness
    public static LevelData getLevel(int n)
    {
        LevelData levelData = new LevelData ();
        switch (n) {
        case 1:
            levelData.hallData = new string[]{
                "############D##",
                "# h-  hrh    ##",
                "# # ###########",
                "# #h###########",
                "#u# ###########",
                "# # ###########",
                "#h#T###########",
                "# #############",
                "# #############",
            };
            levelData.startPosition = new Vector2(1, 8);
            /*Orientations*/
            //Doors
            levelData.addOrientation(12, 0, Orientation.SOUTH);
            levelData.addDoor(12, 0);
            //Treasures
            levelData.addOrientation(3, 6, Orientation.WEST);
            //helpsounds
            levelData.addSound(1, 6, "ayuda_tesoro", 4);
            levelData.addSound(3, 3, "tesoro-cerca", 6);
            levelData.addSound(2, 1, "sonidos-lados", 10);
            levelData.addSound(6, 1, "sonido-positivo", 5);
            levelData.addSound(8, 1, "sonido-negativo", 5);
            break;
        case 2:
            levelData.hallData = new string[]{
                "############D##",
                "#Xh-   r     ##",
                "### ###########",
                "### ###########",
                "###u###########",
                "##T-h #########",
                "# ###M#########",
                "#- h  #########",
                "# #############",
            };
            levelData.startPosition = new Vector2(1, 8);
            /*Orientations*/
            //Doors
            levelData.addOrientation(12, 0, Orientation.SOUTH);
            levelData.addDoor(12, 0);
            //Treasures
            levelData.addOrientation(2, 5, Orientation.EAST);
            //Traps
            levelData.addOrientation(1, 1, Orientation.EAST);
            levelData.addTrap(1,1);
            //Monsters
            levelData.addOrientation(5, 6, Orientation.SOUTH);
            levelData.addMonster(5, 6);
            levelData.addSound(3, 7, "advertencia_monster", 8);
            levelData.addSound(2, 1, "advertencia-trampa", 4);
            levelData.addSound(4, 5, "tesoro-cerca", 4);
            break;
        case 3:
            levelData.hallData = new string[]{
                "############D##",
                "############ ##",
                "############u##",
                "#  -h    T##W##",
                "#u# ########h##",
                "# # r ###    ##",
                "# ###M###u#####",
                "#- r -    #####",
                "# #############",
            };
            levelData.startPosition = new Vector2(1, 8);
            /*Orientations*/
            //Doors
            levelData.addOrientation(12, 0, Orientation.SOUTH);
            levelData.addDoor(12, 0);
            //Treasures
            levelData.addOrientation(9, 3, Orientation.WEST);
            //Monsters
            levelData.addOrientation(5, 6, Orientation.SOUTH);
            levelData.addMonster(5, 6);

            //Warps
            levelData.addSound(4, 3, "tesoro-cerca", 4);
            levelData.addOrientation(12, 3, Orientation.SOUTH);
            levelData.addSound(12, 4, "energia-portal", 4);
            break;
        case 4:
            levelData.hallData = new string[]{
                "#   r      D###",
                "#u#############",
                "#Wh ###  M  T##",
                "### ### #####T#",
                "### l  -   ## #",
                "####### ##    #",
                "###T### #######",
                "###-   -  l   #",
                "X h ######### #",
            };
            levelData.startPosition = new Vector2(13, 8);
            /*Orientations*/
            //Doors
            levelData.addOrientation(11, 0, Orientation.WEST);
            levelData.addDoor(11, 0);
            //Treasures
            levelData.addOrientation(12, 2, Orientation.WEST);
            levelData.addOrientation(13, 3, Orientation.SOUTH);
            levelData.addOrientation(3, 6, Orientation.SOUTH);
            //Monsters
            levelData.addOrientation(9, 2, Orientation.WEST);
            levelData.addMonster(9, 2);

            //Trap
            levelData.addOrientation(0, 8, Orientation.EAST);

            //Warps
            levelData.addOrientation(1, 2, Orientation.EAST);
            levelData.addSound(2, 2, "energia-portal", 4);
            levelData.addSound(2, 8, "advertencia-trampa", 4);
            break;
        default:
            break;
        }
        return levelData;
    }