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)
Пример #3
0
def keyboardOpenPause(state):
    global isOpen
    if (state == "down" and isActive):
        if isOpen:
            usedInterface.delete()
            Global.setInterfaceOpen(False)
            playerBehaviour.setControlsEnabled(True)
            isOpen = False

            characterBehaviour.stopMouvementForAllCharacters(True)
        else:
            if not Global.isInterfaceOpen():
                usedInterface.create()
                isOpen = True
                Global.setInterfaceOpen(True)
                playerBehaviour.setControlsEnabled(False)
                characterBehaviour.stopMouvementForAllCharacters(False)
def keyboardOpenPause(state):
	global isOpen;
	if(state == "down" and isActive):
		if isOpen:
			usedInterface.delete();
			Global.setInterfaceOpen(False);
			playerBehaviour.setControlsEnabled(True);
			isOpen = False;

			characterBehaviour.stopMouvementForAllCharacters(True);
		else:
			if not Global.isInterfaceOpen():
				usedInterface.create();
				isOpen = True;
				Global.setInterfaceOpen(True);
				playerBehaviour.setControlsEnabled(False);
				characterBehaviour.stopMouvementForAllCharacters(False);
def keyboardOpenInventory(state):
	global isOpen;

	if (state == "down") and isActive and (usedInventory != None) and (usedInterface != None):
		if isOpen:
			# close it
			Global.setInterfaceOpen(False);
			usedInterface.delete();
			isOpen = False;
			playerBehaviour.setControlsEnabled(True);
		else:
			# open it
			if not Global.isInterfaceOpen():
				usedInterface.create();
				isOpen = True;
				Global.setInterfaceOpen(True);
				playerBehaviour.setControlsEnabled(False);
Пример #6
0
def open():
	global isOpen;
	if isActive and (usedInterface != None):
		if isOpen:
			# close it
			Global.setInterfaceOpen(False);
			usedInterface.delete();
			isOpen = False;
			playerBehaviour.setControlsEnabled(True);
			
			GlobalVars.getVar("sounds")['thunder'].stop();
			GlobalVars.getVar("sounds")['creepy'].stop();
		else:
			# open it
			if not Global.isInterfaceOpen():
				usedInterface.create();
				isOpen = True;
				Global.setInterfaceOpen(True);
				playerBehaviour.setControlsEnabled(False);