public LibrariesIF createLibrary() { var x = Activator.CreateInstance(null, "WordBlaster.Libraries.LevelFourLibrary"); LibrariesIF library = (LibrariesIF)x.Unwrap(); return(library); }
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(); }