Пример #1
0
 void Update()
 {
     if (inRange && Input.GetKeyDown(KeyCode.Q) && !dialogueBox.activeSelf && playerController.enabled)
     {
         typer.receiveAction(" You shoot the breeze with Big Al.");
         if (!givenSandwich)
         {
             if (!playerController.getInventory().Contains("Three Little Pigs Sandwich"))
             {
                 playerController.addItem("Three Little Pigs Sandwich");
             }
             givenSandwich            = true;
             playerController.enabled = false;
             dialogueBox.SetActive(true);
             dialogueReceiver.createDialogue(playerController, messageList1, nameList1);
         }
         else if (givenSandwich && !playerController.getInventory().Contains("Three Little Pigs Sandwich"))
         {
             playerController.addItem("Three Little Pigs Sandwich");
             playerController.enabled = false;
             dialogueBox.SetActive(true);
             dialogueReceiver.createDialogue(playerController, messageList2, nameList2);
         }
         else
         {
             playerController.enabled = false;
             dialogueBox.SetActive(true);
             dialogueReceiver.createDialogue(playerController, messageList1, nameList1);
         }
     }
 }
Пример #2
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyUp(KeyCode.I))
     {
         typer.receiveAction("TestMessage");
     }
 }
Пример #3
0
 void Update()
 {
     if (finished && playerController.enabled)
     {
         gameObject.SetActive(false);
     }
     if (inRange && Input.GetKeyDown(KeyCode.Q) && !dialogueBox.activeSelf && playerController.enabled)
     {
         playerController.enabled = false;
         typer.receiveAction(" You talk to the wolf.");
         dialogueBox.SetActive(true);
         //Reference DialogueBox. Give input text. Hand off to DialogueBox Script. Handle variables for story beats over here.
         if (girlAttributes.getFoundGrandma() == 0)
         {
             dialogueReceiver.createDialogue(playerController, messageList1, nameList1);
         }
         else if (girlAttributes.getFoundGrandma() == 1 && !playerController.getInventory().Contains("Three Little Pigs Sandwich"))
         {
             dialogueReceiver.createDialogue(playerController, messageList2, nameList2);
         }
         else
         {
             dialogueReceiver.createDialogue(playerController, messageList3, nameList3);
             playerController.removeItem("Three Little Pigs Sandwich");
             finished = true;
         }
     }
 }
Пример #4
0
    private IEnumerator youWinGame()
    {
        clown.GetComponent <Animator>().runtimeAnimatorController = clownMelt;
        yield return(new WaitForSeconds(4.0f));

        typer.receiveAction(" You won the scary trivia game!");
        yield return(new WaitForSeconds(2.0f));

        youWin.SetActive(true);
    }
Пример #5
0
 void Update()
 {
     if (inRange && Input.GetKeyDown(KeyCode.Q) && !dialogueBox.activeSelf && playerController.enabled && !gotHat)
     {
         gotHat = true;
         typer.receiveAction(" You snatch the hat!");
         playerController.addItem("Party Hat");
         playerController.enabled = false;
         render.enabled           = false;
         dialogueBox.SetActive(true);
         dialogueReceiver.createDialogue(playerController, messageList1, nameList1);
     }
 }
Пример #6
0
 void Update()
 {
     if (startGame && inRange && playerController.enabled == true && !quizBox.activeSelf)
     {
         playerController.stopMoving();
         playerController.enabled = false;
         this.GetComponent <Animator>().enabled = true;
         //this.GetComponent<BoxCollider2D>().enabled = false;
         //gameObject.GetComponent<BoxCollider2D>().enabled = true;
         gameObject.GetComponent <BoxCollider2D>().offset = new Vector2(gameObject.GetComponent <BoxCollider2D>().offset.x, -3.5f);
         inRange = false;
         start4  = false;
         quizBox.SetActive(true);
         quizBox.GetComponent <quizSegment>().startup();
         songs[5].Stop();
         songs[6].volume = 0;
         dialogueBox.SetActive(true);
     }
     if (start4 && inRange && playerController.enabled == true)
     {
         playerController.enabled = false;
         dialogueBox.SetActive(true);
         dialogueReceiver.createDialogue(playerController, messageList4, nameList4);
         startGame = true;
     }
     if (inRange && Input.GetKeyDown(KeyCode.Q) && hasSupplies && playerController.enabled == true)
     {
         //Change to new sprite, slowly raise up, drop mic from top, start the music
         playerController.enabled = false;
         StartCoroutine(startParty());
     }
     if (inRange && Input.GetKeyDown(KeyCode.Q) && !dialogueBox.activeSelf && playerController.enabled)
     {
         typer.receiveAction(" It's like talking to a brick wall.");
         if (spokenTo && playerController.getInventory().Contains("Party Hat") && playerController.getInventory().Contains("Noisemaker"))
         {
             playerController.enabled = false;
             dialogueBox.SetActive(true);
             dialogueReceiver.createDialogue(playerController, messageList2, nameList2);
             hasSupplies = true;
         }
         else
         {
             spokenTo = true;
             playerController.enabled = false;
             dialogueBox.SetActive(true);
             dialogueReceiver.createDialogue(playerController, messageList1, nameList1);
         }
     }
 }
Пример #7
0
 void Update()
 {
     if (inRange && Input.GetKeyDown(KeyCode.Q) && !dialogueBox.activeSelf && playerController.enabled)
     {
         typer.receiveAction(" You completed the challenge!");
         playerController.enabled = false;
         dialogueBox.SetActive(true);
         // if player doesn't have party popper yet
         if (!(playerController.getInventory().Contains("Noisemaker")))
         {
             dialogueReceiver.createDialogue(playerController, messageList1, nameList1);
             playerController.addItem("Noisemaker");
         }
     }
 }
Пример #8
0
 void Update()
 {
     if (inRange && Input.GetKeyDown(KeyCode.Q) && !dialogueBox.activeSelf && playerController.enabled)
     {
         playerController.enabled = false;
         typer.receiveAction(" You speak to the girl.");
         dialogueBox.SetActive(true);
         if (foundGrandma == 0 || foundGrandma == 1)
         {
             setFoundGrandma(1);
             dialogueReceiver.createDialogue(playerController, messageList1, nameList1);
         }
         else if (foundGrandma == 2)
         {
             dialogueReceiver.createDialogue(playerController, messageList2, nameList2);
         }
     }
 }
Пример #9
0
 void Update()
 {
     if (inRange && Input.GetKeyDown(KeyCode.Q) && !dialogueBox.activeSelf && playerController.enabled)
     {
         if (!playerController.getInventory().Contains("Old Key"))
         {
             playerController.enabled = false;
             dialogueBox.SetActive(true);
             dialogueReceiver.createDialogue(playerController, messageList1, nameList1);
         }
         else if (render.sprite != openGate)
         {
             typer.receiveAction(" You unlock the gate.");
             render.sprite = openGate;
             changeCol1.SetActive(false);
         }
     }
 }
Пример #10
0
 void Update()
 {
     if (inRange && Input.GetKeyDown(KeyCode.Q) && !dialogueBox.activeSelf && playerController.enabled)
     {
         Debug.Log("Test");
         typer.receiveAction(" You converse with Loud Jeff.");
         playerController.enabled = false;
         dialogueBox.SetActive(true);
         // if player doesn't have party popper yet
         Debug.Log(playerController.getInventory().Contains("Noisemaker"));
         if (!(playerController.getInventory().Contains("Noisemaker")))
         {
             dialogueReceiver.createDialogue(playerController, messageList1, nameList1);
         }
         // if the player does have the party popper
         else
         {
             dialogueReceiver.createDialogue(playerController, messageList2, nameList2);
         }
     }
 }
Пример #11
0
 void Update()
 {
     if (inRange && Input.GetKeyDown(KeyCode.Q) && !dialogueBox.activeSelf && playerController.enabled)
     {
         typer.receiveAction(" You converse with the grandmother.");
         playerController.enabled = false;
         dialogueBox.SetActive(true);
         if (girlAttributes.getFoundGrandma() == 0)
         {
             dialogueReceiver.createDialogue(playerController, messageList1, nameList1);
         }
         else
         {
             dialogueReceiver.createDialogue(playerController, messageList2, nameList2);
             if (girlAttributes.getFoundGrandma() != 2)
             {
                 playerController.addItem("Old Key");
                 girlAttributes.setFoundGrandma(2);
             }
         }
     }
 }
Пример #12
0
    IEnumerator castThunder()
    {
        pause = true;
        typer.receiveAction(" You cast Thunder,");
        yield return(new WaitForSeconds(2.0f));

        GetComponent <AudioSource>().Play();
        yield return(new WaitForSeconds(3.0f));

        typer.receiveAction(" You forgot that Thunder is just the noise.");
        pause = false;
        leaveSubMenu();
    }
Пример #13
0
 void typedMessage()
 {
     if (newArea.name == "Road")
     {
         typer.receiveAction(toRoad);
     }
     else if (newArea.name == "Meadow")
     {
         typer.receiveAction(toMeadow);
     }
     else if (newArea.name == "Forest (1)")
     {
         typer.receiveAction(toForest1);
     }
     else if (newArea.name == "Forest (2)")
     {
         typer.receiveAction(toForest2);
     }
     else if (newArea.name == "Forest (3)")
     {
         typer.receiveAction(toForest3);
     }
     else if (newArea.name == "BigAl'sZone")
     {
         typer.receiveAction(toBigAls);
     }
     else if (newArea.name == "Void")
     {
         typer.receiveAction(toVoid);
     }
     else if (newArea.name == "Gate" && newArea.GetComponent <SpriteRenderer>().sprite == gateSpriteCheck) //This is fine?
     {
         typer.receiveAction(toGateLocked);
     }
     else if (newArea.name == "Gate")
     {
         typer.receiveAction(toGateOpen);
     }
     else if (newArea.name == "QuietForest1")
     {
         typer.receiveAction(toQuietForest1);
     }
     else if (newArea.name == "QuietForest2")
     {
         typer.receiveAction(toQuietForest2);
     }
     else if (newArea.name == "QuietForest3")
     {
         typer.receiveAction(toQuietForest3);
     }
     else if (newArea.name == "Pedestal")
     {
         typer.receiveAction(toPedestal);
     }
     else if (newArea.name == "PartyWall")
     {
         typer.receiveAction(toPartyWall);
     }
     else if (newArea.name == "PathToStart1")
     {
         typer.receiveAction(toPathToStart1);
     }
     else if (newArea.name == "PathToStart2")
     {
         typer.receiveAction(toPathToStart2);
     }
 }