Exemplo n.º 1
0
        public void SetLevel(int levelNumber)
        {
            Level newLevel = new Level(this);

            switch (levelNumber)
            {
            case (1):
                newLevel = new Level1(this);
                break;

            case (2):
                newLevel = new Level2(this);
                break;

            case (3):
                newLevel = new Level3(this);
                break;

            case (4):
                newLevel = new Level4(this);
                break;

            case (5):
                newLevel = new Level5(this);
                break;

            default:
                break;
            }

            currentLevel = newLevel;
            scriptManager.Execute(currentLevel.LevelScript);
        }
Exemplo n.º 2
0
        public void SetLevel(int levelNumber)
        {
            Level newLevel = new Level(this);
            switch (levelNumber)
            {
                case(1):
                    newLevel = new Level1(this);
                    break;
                case (2):
                    newLevel = new Level2(this);
                    break;
                case (3):
                    newLevel = new Level3(this);
                    break;
                case (4):
                    newLevel = new Level4(this);
                    break;
                case (5):
                    newLevel = new Level5(this);
                    break;
                default:
                    break;
            }

            currentLevel = newLevel;
            scriptManager.Execute(currentLevel.LevelScript);
        }