コード例 #1
0
def setActive(value):
    global isActive
    isActive = value

    keyboardEvent = Keyboard("action")
    keyboardEvent.on(actionKeyboard)

    if isActive:
        Update.on(checkForAction)
def setActive(value):
	global isActive;
	isActive = value;

	keyboardEvent = Keyboard("action");
	keyboardEvent.on(actionKeyboard);

	if isActive:
		Update.on(checkForAction);
コード例 #3
0
def setActive():
    leftKey = Keyboard("left")
    leftKey.on(moveLeft)
    rightKey = Keyboard("right")
    rightKey.on(moveRight)

    setControlsEnabled(True)

    Update.on(lambda: updatePosition())
コード例 #4
0
def setActive(value):
    global isActive
    isActive = value

    if value:
        keyboardEvent = Keyboard("action")
        keyboardEvent.on(keyboardInput)

        cancelEvent = Keyboard("escape")
        cancelEvent.on(cancelInput)
コード例 #5
0
def setActive():
	leftKey = Keyboard("left");
	leftKey.on(moveLeft);
	rightKey = Keyboard("right");
	rightKey.on(moveRight);

	setControlsEnabled(True);

	Update.on(lambda: updatePosition());
コード例 #6
0
def setActive(value):
	global isActive;
	isActive = value;

	if value:
		keyboardEvent = Keyboard("action");
		keyboardEvent.on(keyboardInput);

		cancelEvent = Keyboard("escape");
		cancelEvent.on(cancelInput);
コード例 #7
0
def setActive(value):
	global isActive;
	global isOpen;
	global usedInterface;

	isActive = value;

	usedInterface = GlobalVars.getVar("menuInterface");
	usedInterface.setOutside(outsider);

	if value:
		selectItem = Keyboard("action");
		selectItem.on(selectionItem);

		arrowUp = Keyboard("up");
		arrowUp.on(moveSelectionUp2);
		arrowDown = Keyboard("down");
		arrowDown.on(moveSelectionDown2);
		arrowLeft = Keyboard("left");
		arrowLeft.on(closeGameMenu);
コード例 #8
0
def setActive(value):
    global isActive
    global usedInterface
    isActive = value

    if value:
        keyboardInput = Keyboard("escape")
        keyboardInput.on(keyboardOpenPause)
        usedInterface = GlobalVars.getVar("pauseInterface")

        selectItem = Keyboard("action")
        selectItem.on(selectionItem)

        arrowUp = Keyboard("up")
        arrowUp.on(moveSelectionUp)
        arrowDown = Keyboard("down")
        arrowDown.on(moveSelectionDown)
コード例 #9
0
def setActive(value):
	global isActive;
	isActive = value;

	keyboardAction = Keyboard("escape");
	keyboardAction.on(doClear);
コード例 #10
0
def setActive(value):
    global isActive
    isActive = value

    keyboardAction = Keyboard("escape")
    keyboardAction.on(doClear)
コード例 #11
0
def setActive(value):
	global isActive;
	global usedInterface;
	isActive = value;

	if value:
		keyboardInput = Keyboard("escape");
		keyboardInput.on(keyboardOpenPause);
		usedInterface = GlobalVars.getVar("pauseInterface");

		selectItem = Keyboard("action");
		selectItem.on(selectionItem);

		arrowUp = Keyboard("up");
		arrowUp.on(moveSelectionUp);
		arrowDown = Keyboard("down");
		arrowDown.on(moveSelectionDown);
コード例 #12
0
def setActive(value):
	global isActive;
	isActive = value;

	if value:
		keyboardInput = Keyboard("inventory");
		keyboardInput.on(keyboardOpenInventory);

		selectItem = Keyboard("action");
		selectItem.on(selectionItem);

		arrowUp = Keyboard("up");
		arrowUp.on(moveSelectionUp);
		arrowDown = Keyboard("down");
		arrowDown.on(moveSelectionDown);