public void SideroomDoorLock() { sideDoorLock = true; sideroomdoor.locked = sideDoorLock; string[] eventtext = { "You hear the door click behind you." }; handler.StartScene(eventtext); }
// Update is called once per frame void Update() { if (Input.GetKeyDown("space") && inside && !movscript.GetMovementLock()) { if (!locked) { movscript.LockMovement(); if (above) { cs.StartWipe(inwipe, outwipe, AboveTeleport, movscript.UnlockMovement); } else { cs.StartWipe(inwipe, outwipe, BelowTeleport, movscript.UnlockMovement); } if (sound != null) { audio.PlayOneShot(sound); } } else { handler.StartScene(locktext); } } }
// Update is called once per frame void Update() { if (Input.GetKeyDown("space") && inside) { handler.StartScene(interactableDialogue); } }
// Update is called once per frame void Update() { if (Input.GetKeyDown("space") && inside && !movscript.GetMovementLock()) { if (!switchedon) { if (onDialogue) { handler.StartScene(switchOffText); } if (sound != null) { audio.PlayOneShot(sound); } switchedon = true; onfunc.Invoke(); sr.sprite = onsprite; } else { // Josiah - changed so toggleable bool actually keeps it from switching if (toggleable) { if (offDialogue) { handler.StartScene(switchOffText); } switchedon = false; if (sound != null) { audio.PlayOneShot(sound); } sr.sprite = offsprite; offfunc.Invoke(); } else if (showTextEvenWhenNotToggleable) //Jake - should have mentioned that it's intended behaviour to still trigger a scene using the switchOffText, but I created a separate bool for this case just to make it more explicit //for when its intended { if (offDialogue) { handler.StartScene(switchOffText); } } } } }
// Update is called once per frame void Update() { if (Input.GetKeyDown("space") && inside && !pm.GetMovementLock()) { if (!opened) { handler.StartScene(interactableDialogue); if (pd.items.Contains(keyId)) { choiceMenuScript.openMenu(keyId, id.dir[(int)keyId].name, unlockBox); } } else { handler.StartScene(openedText); } } }
// Update is called once per frame void Update() { if (Input.GetKeyDown("space") && inside && !pm.GetMovementLock()) { if (!opened) { handler.StartScene(interactableDialogue); opened = true; pd.GiveItem(itemId); itemReceivedStinger.PlayOneShot((AudioClip)Resources.Load("Sounds/ItemFound")); sr.sprite = openedSprite; } else { handler.StartScene(openedText); } } }
//When player enters room, he realizes he is in a hospital public void EnterRoom() { string[] dialogue = { "Looks like you're in a hospital. Guess that's better than being dead???" }; handler.StartScene(dialogue); entranceTrigger.SetActive(false); }