def callFunctions(self): for function in self.functionsToCallWhenAction: function(); if self.assignedDialog != None and self.assignedDialog.getStarted() == False: if not Global.isInterfaceOpen(): dialogBehaviour.setDialog(self.assignedDialog); self.assignedDialog.setCharacter(self); self.assignedDialog.setStarted(True); dialogBehaviour.start(); Global.setInterfaceOpen(True); playerBehaviour.enableMouvement(False);
def callFunctions(self): for function in self.functionsToCallWhenAction: function() if self.assignedDialog != None and self.assignedDialog.getStarted( ) == False: if not Global.isInterfaceOpen(): dialogBehaviour.setDialog(self.assignedDialog) self.assignedDialog.setCharacter(self) self.assignedDialog.setStarted(True) dialogBehaviour.start() Global.setInterfaceOpen(True) playerBehaviour.enableMouvement(False)
def stop(): global isDialogStarted global currentDialog global currentIndex playerBehaviour.setControlsEnabled(True) playerBehaviour.enableMouvement(True) isDialogStarted = False currentDialog.setStarted(False) interface = currentDialog.getAssignedInterface() interface.delete() characterElement = currentDialog.getCharacter() characterElement.isWalking(True) currentDialog = None currentIndex = 1 Global.setInterfaceOpen(False)
def stop(): global isDialogStarted; global currentDialog; global currentIndex; playerBehaviour.setControlsEnabled(True); playerBehaviour.enableMouvement(True); isDialogStarted = False; currentDialog.setStarted(False); interface = currentDialog.getAssignedInterface(); interface.delete(); characterElement = currentDialog.getCharacter(); characterElement.isWalking(True); currentDialog = None; currentIndex = 1; Global.setInterfaceOpen(False);