def __init__(self, screen, compType, position): self.type = compType self.GUI = None #DrawObject self.compartment = Compartment(compType) self.screen = screen file_name = None if compType == "weapon": self.compartment.use = self.compartment.typeWeaponUse file_name = "cannon.png" elif compType == "shield": file_name = "shield.png" elif compType == "health": self.compartment.use = self.compartment.typeHealthUse file_name = "health.png" elif compType == "engine": self.compartment.use = self.compartment.typeEngineUse file_name = "engine.png" elif compType == "light": file_name = "light.png" self.GUI = Draw_Comp(file_name, self.screen, position)