def loadCommands(self): cmdManager = CommandManager() commands = [cls for cls in vars()['Command'].__subclasses__() ] #gets all classes that extends command class for command in commands: cmdManager.addItem( command(self.actionManager, self.cam, self.heightController) ) #initiallise commands and add them to command manager
def loadCommands(self): cmdManager = CommandManager(); commands = [cls for cls in vars()['Command'].__subclasses__()] #gets all classes that extends command class for command in commands: cmdManager.addItem(command(self.actionManager, self.cam, self.heightController)) #initiallise commands and add them to command manager