def __init__(self): self.model = rpgModel.Model() self.character = rpgModel.Character() self.hero = rpgModel.Hero() self.monster = rpgModel.Monster() self.boss = rpgModel.Boss() self.view = rpgView.DisplayBoard() # irányító gombok self.view.root.bind('<Left>', self.leftKeyDetected) self.view.root.bind('<Right>', self.rightKeyDetected) self.view.root.bind('<Up>', self.upKeyDetected) self.view.root.bind('<Down>', self.downKeyDetected)
def __init__(self): self.model = rpgModel.Model() self.character = rpgModel.Character() self.hero = rpgModel.Hero() self.monster = rpgModel.Monster() self.keyholder = rpgModel.Monster() self.boss = rpgModel.Boss() self.view = rpgView.DisplayBoard() self.view.root.bind('<Left>', self.leftKeyDetected) self.view.root.bind('<Right>', self.rightKeyDetected) self.view.root.bind('<Up>', self.upKeyDetected) self.view.root.bind('<Down>', self.downKeyDetected) self.view.root.bind('<space>', self.battleHappens)
def __init__(self): self.model = rpgModel.Model() self.character = rpgModel.Character() self.hero = rpgModel.Hero() for i in range(random.randint(3, 5)): self.monster = rpgModel.Monster() #self.monster2 = rpgModel.Monster() #self.monster3 = rpgModel.Monster() self.boss = rpgModel.Boss() self.view = rpgView.DisplayBoard() self.enemy = 'none' # irányító gombok self.view.root.bind('<Left>', self.leftKeyDetected) self.view.root.bind('<Right>', self.rightKeyDetected) self.view.root.bind('<Up>', self.upKeyDetected) self.view.root.bind('<Down>', self.downKeyDetected) self.view.root.bind('<space>', self.battleHappens)