public GameShapesIF createShape()
        {
            var          x     = Activator.CreateInstance(null, "WordBlaster.Shapes.BlueShip2");
            GameShapesIF shape = (GameShapesIF)x.Unwrap();

            return(shape);
        }
Exemple #2
0
        public void NewLevel(int level)
        {
            FactoryProducer factoryProducer = new FactoryProducer();

            levelFactory = factoryProducer.getFactory(level); //Get the factory for the level
            library      = levelFactory.createLibrary();      //Creates Library Associated with LevelLibrary
            String word = library.generateWord();             //Generates a word from LevelLibrary

            shape              = levelFactory.createShape();  //Creates the Shape and color of shape for level
            delaytime          = levelFactory.getDelay();
            this.level         = levelFactory.getLevel();     //Only needed for if dynamic linkage doesnt work, makes sure to get the true level
            IntLevelLabel.Text = this.level.ToString();
        }