public override void OnTriggered() { switch (currEvent) { case CONSOLE_EVENT.DOOR_REQUEST: if (savedObject != null) { if (hasConsoleTextChanged == 0) // if all the text has displayed, then allow touch to open door { // Open the door, then DoorButton buttonScript = GetScript <DoorButton>(savedObject); if (buttonScript != null) { buttonScript.AllowUnlockDoor(); } EndOfDoorButtonEvent(); } else // If still typing out, first click immediately shows all the text { UpdateAllTextImmediately(); } } break; case CONSOLE_EVENT.DOOR_MINIGAME_TURN: if (savedObject != null) { // Open the door, then DoorUnlockSequence doorUnlockSeq = GetScript <DoorUnlockSequence>(savedObject); if (doorUnlockSeq != null) { doorUnlockSeq.CenterPull(0); } } break; case CONSOLE_EVENT.MINIGAME_FOUR_PLAYERS: if (savedObject != null && eventState != -1 && eventState2 != -1) // If one of the buttons is active { MiniGameFourPlayersButtonController minigameScript = GetScript <MiniGameFourPlayersButtonController>(savedObject); if (minigameScript != null) { minigameScript.TriggeredButton(eventState, false); // Click on screen to perform action on game } } break; } }
public override void OnStealthPlayerMouseInteract() { if (completed) { return; } if (isButtonActive) { if (doorName != null) { doorUnlockSeq.SetParticipants(gameObject, panelParent, doorName); } doorUnlockSeq.CenterPull(1); mSound.PlayIndependentEvent("PINPAD_INPUT.vente", false, 1); } }