예제 #1
0
 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
예제 #2
0
 def __init__(self, worldPath):
     Entity.__init__(self, "Rock", worldPath)
     pass
예제 #3
0
 def __init__(self, worldPath):
     Entity.__init__(self, "Scissors", worldPath)
     pass
예제 #4
0
 def __init__(self, worldPath):
     Entity.__init__(self, "Paper", worldPath)
     pass