def __init__(self, path, sceneWidth): super().__init__() self.setType("background") # texture texture = Image(path) texture.setDepth(0) # size self.assignDrawable(texture) self.setDepth(-10) # left leftPanel = Image("assets/dot.png") leftPanel.setSize(texture.getSize()[0] / 2, 400) leftPanel.setOffsetPosition(-texture.getSize()[0] / 2, 0) leftPanel.setAffectedByParent(False) self.assignDrawable(leftPanel) # right rightPanel = Image("assets/dot.png") rightPanel.setSize(texture.getSize()[0] / 2, 400) rightPanel.setOffsetPosition(sceneWidth, 0) rightPanel.setAffectedByParent(False) self.assignDrawable(rightPanel)
def __init__(self, category, x, y): super().__init__() self.category = category self.setPosition(x, y) # add texture to the wall texture = Image("assets/elements/wall/" + category + ".png") if texture: self.assignDrawable(texture) self.size = texture.getSize()
def __init__(self, category, x, y): super().__init__(); self.category = category; self.setPosition(x, y); # add texture to the wall texture = Image("assets/elements/wall/" + category + ".png"); if texture: self.assignDrawable(texture); self.size = texture.getSize();
def __init__(self, type, x, y): super().__init__() self.setType("pickup") # add texture texture = Image("assets/dickbutt.png") texture.setSize(64, 64) if texture: texture.setDepth(10) self.assignDrawable(texture) self.size = texture.getSize() self.setDepth(10)
def __init__(self, type, x, y): super().__init__(); self.setType("pickup"); # add texture texture = Image("assets/dickbutt.png"); texture.setSize(64,64); if texture: texture.setDepth(10); self.assignDrawable(texture); self.size = texture.getSize(); self.setDepth(10);
def __init__(self, category, x, y, number = None): super().__init__(); self.category = category; self.setPosition(x, y); self.number = None; # add texture to the door texture = Image("assets/elements/doors/" + category + ".png"); if texture: self.assignDrawable(texture); self.size = texture.getSize(); # add the number in the door self.setNumber(number);