def __init__(self, name, worldPath, characs, color="\u001b[36m"): Entity.__init__(self, name, worldPath) self.characteristics = characs dialogueFile = os.path.abspath(GetGame.game.gameRoot + "/Dialogues/" + self.name + ".json") try: if os.path.exists(dialogueFile): with open(dialogueFile, 'r', encoding="utf-8") as f: jsonText = "".join(f.readlines()) jsonText = jsonText.replace("{username}", GetGame.game.user_name) self.dialogues = json.loads(jsonText) else: self.dialogues = None except Exception as e: print(str(e)) self.color = color
def __init__(self, worldPath): Entity.__init__(self, "Rock", worldPath) pass
def __init__(self, worldPath): Entity.__init__(self, "Scissors", worldPath) pass
def __init__(self, worldPath): Entity.__init__(self, "Paper", worldPath) pass