示例#1
0
 private void OnTriggerEnter2D(Collider2D other)
 {
     if (other.tag == "Player")
     {
         if (possessionCheck)
         {
             if (other.GetComponent <PlayerPossession>().itemName == conditionalItem)
             {
                 changeScene();
                 Debug.Log(other.GetComponent <PlayerPossession>().itemName);
             }
             else
             {
                 SaySmt.PrepLine("Priest", "Hey, no ghosts allowed!");
                 SaySmt.PrepLine("Clyde", "I think I need a disguise to get in...");
                 SaySmt.PlayLines();
             }
         }
         else if (destinationSwitchId < 0)
         {
             SaySmt.Line("", "A mysterious voice tells you to not look back.");
             SaySmt.prepClose = true;
         }
         else
         {
             changeScene();
         }
     }
 }
示例#2
0
 void WinGame()
 {
     winGame     = true;
     gameStarted = false;
     stationaryCultists.SetActive(false);
     mobileCultists.SetActive(false);
     sacrificialBonnie.SetActive(false);
     music[0].Stop();
     music[1].Stop();
     music[2].Play(0);
     SaySmt.PrepLine("Priests", "Noooo the ritual is ruined!!!");
     SaySmt.PrepLine("Priests", "We will be back.....");
     SaySmt.PlayLines();
     SaySmt.prepClose = true;
 }
示例#3
0
 // Update is called once per frame
 public void Speak()
 {
     if (!spoken && lines.Count > 0)
     {
         foreach (var line in lines)
         {
             SaySmt.PrepLine(line.speaker != "" ? line.speaker : "", line.message);
         }
         SaySmt.PlayLines();
         spoken = true;
     }
     else
     {
         SaySmt.Line(endLine.speaker, endLine.message);
     }
 }
示例#4
0
 void LoseGame()
 {
     loseGame    = true;
     gameStarted = false;
     music[0].Stop();
     music[1].Stop();
     music[3].Play(0);
     camera.GetComponent <FollowPlayer>().enabled = false;
     camera.transform.position = new Vector3(-3, 8, -10);
     player.GetComponent <PlayerMovement>().speed = 0;
     director.GetComponent <PlayableDirector>().Play();
     sacrificialBonnie.SetActive(false);
     SaySmt.PrepLine("Demon", "HAHA!");
     SaySmt.PrepLine("Demon", "I HAVE BEEN SUMMONED!");
     SaySmt.PrepLine("Demon", "DIEEE LITTLE GHOST!");
     SaySmt.PlayLines();
     SaySmt.prepClose = true;
     StartCoroutine(PlayerDeath());
 }