コード例 #1
0
 public void SideroomDoorLock()
 {
     sideDoorLock        = true;
     sideroomdoor.locked = sideDoorLock;
     string[] eventtext = { "You hear the door click behind you." };
     handler.StartScene(eventtext);
 }
コード例 #2
0
 // 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);
         }
     }
 }
コード例 #3
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown("space") && inside)
     {
         handler.StartScene(interactableDialogue);
     }
 }
コード例 #4
0
 // 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);
                 }
             }
         }
     }
 }
コード例 #5
0
 // 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);
         }
     }
 }
コード例 #6
0
 // 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);
         }
     }
 }
コード例 #7
0
    //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);
    }