Commit b05ae581 authored by mmaluschnig's avatar mmaluschnig
Browse files

Merge branch 'simonthebear'

* simonthebear:
  John Smith is half done, Silas is fully done.
  IntroScene seems done =)
  Intro scene is now okay.
parents 000f2c7f defd818f
......@@ -27,23 +27,22 @@ public class JohnSmithSpeech : MonoBehaviour, Character {
return "Hello, im John Smith";
} else if ((int)GameManager.getLevel(getName()) == 2) {
currentResponses = new string[] { "stage 2 greeting response" };
return "stage 2 (hello) grr";
currentResponses = new string[] { "Thanks, How's it going John Smith?", "Thanks clown man", "It was a terrible time funny man" };
return "Nice job on the trapeze";
} else if ((int)GameManager.getLevel(getName()) == 3) {
currentResponses = new string[] { "stage 3 greeting response" };
return "stage 3 (hello) grr";
currentResponses = new string[] { "Sure", "I suppose so", "Do I have a choice?" };
return "Hey, can I ask you a question?";
} else if ((int)GameManager.getLevel(getName()) == 4) {
currentResponses = new string[] { "stage 4 greeting response" };
return "stage 4 (hello) grr";
}
return "Something has gone terribly wrong: The stage is: " + GameManager.ConversationStage;
}
public string GoodbyeMessage() {
currentResponses = new string[] { };
return "See you soon!";
return "Come back anytime";
}
public string ProximityMessage() {
......@@ -58,9 +57,9 @@ public class JohnSmithSpeech : MonoBehaviour, Character {
public string nothingMoreToSay() {
currentResponses = new string[] { };
if (Random.Range(0, 1f) < 0.8) {
return "youre still here?";
return "hey";
} else {
return "latta";
return "So nice of you to stay, but I'm not that exciting";
}
}
......@@ -121,35 +120,47 @@ public class JohnSmithSpeech : MonoBehaviour, Character {
private void conversationStage1() {
if (GameManager.HasTalkedToAhava) {
conversation.Enqueue("welcome to the circus");
responseQueue.Enqueue(new string[] { "response 1" });
conversation.Enqueue("welcome to the circus.");
responseQueue.Enqueue(new string[] { "Thanks", "It's an interesting place", "What do you do?"});
conversation.Enqueue("line 2");
responseQueue.Enqueue(new string[] { "response 2", "response 2" });
conversation.Enqueue("if you ever wanna try a really unique performance you should try the trapezing, Ahava let's me take care of that.");
responseQueue.Enqueue(new string[] { "I already have", "I'll give it a go", "Sorry, I don't swing that way" });
conversation.Enqueue("line 3");
responseQueue.Enqueue(new string[] { "response 3", "response 3", "response 3" });
conversation.Enqueue("I mean if you don't want to its fine I guess, I'm John Smith by the way.");
responseQueue.Enqueue(new string[] { "My name is Dennnnnis", "My name is " + GameManager.playerName, "I'm sure I can find time" });
conversation.Enqueue("line 4");
responseQueue.Enqueue(new string[] { "response 4", "response 4" });
conversation.Enqueue("It's nice to meet a new face here, maybe you'll be different from the rest.");
responseQueue.Enqueue(new string[] { "What do you mean?", "different?", "It's nice to meet you to" });
conversation.Enqueue("line 5");
responseQueue.Enqueue(new string[] { "response 5", "response 5", "response 5" });
conversation.Enqueue("Not that I mean anything by that of course, just nice to have a few more ummmm... clowns around here.");
responseQueue.Enqueue(new string[] { "You do seem a few short of a car", "Surely as long as you all get on well?", "something about you seems funny" });
conversation.Enqueue("line 6");
responseQueue.Enqueue(new string[] { "response 6" });
conversation.Enqueue("you're not wrong, I should probably head back into the tent shortly. See you around");
responseQueue.Enqueue(new string[] { "See you in there", "cya", "*just back away*" });
} else {
conversation.Enqueue("talk to the bearded lady before you start clowning around");
responseQueue.Enqueue(new string[] { "okay", "that was a terrible joke" });
responseQueue.Enqueue(new string[] { "okay", "that was a terrible joke", "*back away*" });
}
}
private void conversationStage2() {
conversation.Enqueue("Stage 2 conversation stuff");
responseQueue.Enqueue(new string[] { "Stage 2 response 1", "stage 2 resposne 2" });
conversation.Enqueue("Just remember to keep practicing, wouldn't want someone with a name like yours to waste their talent");
responseQueue.Enqueue(new string[] { "I will", "What does that have to do with it?", "My name is pretty lame" });
conversation.Enqueue("say, do you wanna hear a joke?");
responseQueue.Enqueue(new string[] { "wouldn't miss it", "yes", "no" });
conversation.Enqueue("you'll love it");
responseQueue.Enqueue(new string[] { "I'm waiting", "hurry up", "please no" });
conversation.Enqueue("an accountant asks a trapeze artist what is their net worth. The trapeze artist says 'Every penny'");
responseQueue.Enqueue(new string[] { "I wish I had a penny for every time I heard a joke that bad", "*chuckle slightly*", "that was terrible" });
conversation.Enqueue("AHAHAHAHHAHAHAHAHHAHAHAHHAHAHHAHAHAHHAHAHHHAHHAHAHHAHHHAHAHHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHAHHAHA/n" + " you feel like he took your rejection well");
responseQueue.Enqueue(new string[] { "I wish I had a penny for every time I heard a joke that bad", "*chuckle slightly*", "that was terrible" });
conversation.Enqueue("Stage 2 conversation stuff 2");
responseQueue.Enqueue(new string[] { "Stage 2 response 1", "stage 2 resposne 2" });
conversation.Enqueue("*John struggles to catch his breath* it's cool having you around kid, maybe I'll tell that one to the others. Looking forward to seeing you in the tent");
responseQueue.Enqueue(new string[] { "Can't wait", "looking forward to flying again, cya", "feign interest" });
}
private void conversationStage3() {
......
......@@ -24,31 +24,8 @@ public class PaperSpeech : MonoBehaviour, Character {
{
loadConversation();
if (GameManager.ConversationStage == 1)
{
currentResponses = new string[] { "Hi there", "Who are you", "what is this place" };
return "Hello Player, I am Ahava";
}
else if (GameManager.ConversationStage == 2)
{
currentResponses = new string[] { "stage 2 greeting response" };
return "well done on your performances!";
}
else if (GameManager.ConversationStage == 3)
{
currentResponses = new string[] { "stage 3 greeting response" };
return "stage 3 greeting";
}
else if (GameManager.ConversationStage == 4)
{
currentResponses = new string[] { "stage 4 greeting response" };
return "stage 4 greeting";
}
return "Something has gone terribly wrong: The stage is: " + GameManager.ConversationStage;
currentResponses = new string[] {"Read"};
return "You encounter a well drawn piece of paper on the ground. You can use the number keys to interact";
}
public string GoodbyeMessage()
......@@ -71,14 +48,9 @@ public class PaperSpeech : MonoBehaviour, Character {
public string nothingMoreToSay()
{
currentResponses = new string[] { };
if (Random.Range(0, 1f) < 0.8)
{
return "my beard grows tired of your chitter chatter";
}
else
{
return "Dennis the mennis!";
}
return "WHAT ARE YOU WAITING FOR, JUST WALK TO THE RIGHT TO LEAVE THE CONVERSATION AND START " +
" YOUR CIRCUS CAREER";
}
public string converse()
......@@ -98,8 +70,6 @@ public class PaperSpeech : MonoBehaviour, Character {
private void loadConversation()
{
conversation.Clear();
responseQueue.Clear();
}
......@@ -111,25 +81,22 @@ public class PaperSpeech : MonoBehaviour, Character {
private void Start()
{
conversation.Enqueue("You feel compelled to read the piece of paper by pressing the W or up arrow key.");
responseQueue.Enqueue(new string[] { "response 1" });
conversation.Enqueue("You feel compelled to read the piece of paper by pressing the W or up arrow key.");
responseQueue.Enqueue(new string[] { "response 1" });
conversation.Enqueue("You feel compelled to interact with the piece of paper by pressing the W or up arrow key.");
responseQueue.Enqueue(new string[] {});
conversation.Enqueue("You can interact with the paper by using the number keys");
responseQueue.Enqueue(new string[] {"Read", "Converse", "" });
//GameManager.speechState will be the size of the queue when this dequeued
//make sure to change the check integer in CharacterInteractins when changing dialogue
conversation.Enqueue("What Is Your Name");
responseQueue.Enqueue(new string[] { "okay" });
conversation.Enqueue("Great Name! How about we call you John Smith instead");
responseQueue.Enqueue(new string[] { "I Love it!", "I Hate it!", "I know a guy called John Smith" });
conversation.Enqueue("The words on the page speak to you: CIRQUE DU SOLAME NOW HIRING, NO EXPERIENCE NECCESSARY");
responseQueue.Enqueue(new string[] { "It's better than Macdonalds."});
conversation.Enqueue("Maybe we'll just call you Dennnis");
responseQueue.Enqueue(new string[] { "fine", "not Dennis!" });
conversation.Enqueue("BE THE PERFORMER YOUR PARENTS ALWAYS HOPED YOU WOULDN'T ");
responseQueue.Enqueue(new string[] { "This is tearible", "I just wanna perform", "Actually it's what they always wanted" });
conversation.Enqueue("No Takebacksies");
responseQueue.Enqueue(new string[] { "..." });
conversation.Enqueue("WHAT ARE YOU WAITING FOR, JUST WALK TO THE RIGHT TO LEAVE THE CONVERSATION AND START " +
" YOUR CIRCUS CAREER");
responseQueue.Enqueue(new string[] {});
}
......
......@@ -22,7 +22,7 @@ public class SilasSpeech : MonoBehaviour, Character {
loadConversation();
if ((int)GameManager.getLevel(getName()) == 1) {
currentResponses = new string[] { "Hi there", "Umm hello?", "was geht ab?" };
currentResponses = new string[] { "Hi there", "Umm hello?", "clumsily mime 'Hello'" };
return "...";
} else if ((int)GameManager.getLevel(getName()) == 2) {
......@@ -42,12 +42,12 @@ public class SilasSpeech : MonoBehaviour, Character {
}
public string GoodbyeMessage(){
currentResponses = new string[] { };
return "mime mime mime mime cya bye mime";
return "Oh no don't go, talking is so fun!";
}
public string ProximityMessage(){
currentResponses = new string[] { "yes, me, i did"};
return "did someone enter my invivible box";
currentResponses = new string[] { "yes, me, i did", "Sorry, I get confused about the size of my invisible car", "*try to keep quiet*" };
return "did someone enter my invisible box!";
}
public string butthurtGoodbye(){
currentResponses = new string[] { };
......@@ -56,19 +56,29 @@ public class SilasSpeech : MonoBehaviour, Character {
public string nothingMoreToSay() {
if (GameManager.HasTalkedToAhava) {
currentResponses = new string[] { "wow, tell me more", "my ears are bleeding" };
if((int)GameManager.getLevel(getName()) == 4)
{
currentResponses = new string[] { "wow, tell me more amazing things!", "my ears are blessed!", "I'm just trying to listen harder!" };
}
else {
currentResponses = new string[] { "wow, tell me mo...", "my ears are ble...", "I'm just tryi..." };
}
switch (Random.Range(0, 11)) {
case 0: return "According to circus superstition, it's unlucky to wear green in the ring.";
case 1: return "A 'josser' is an outsider who joins the circus.";
case 2: return "The word clown is believed to come from the Icelandic word klunni, meaning a clumsy person.";
case 3: return "A street mime was so committed that he actually got stuck in his imaginary box and died of starvation";
case 4: return "Banging your head against the wall burns 150 calories";
case 5: return "29th May is oficially 'Put a Pillow on your Fridge Day'.";
case 6: return "in 2017 more people were kiled from injuries caused by taking a selfie than by shark attacks";
case 7: return "Did you know Honey Bees can recognise human faces";
case 8: return "A small child could swim through the veins of a Blue Whale";
case 9: return "pirates wore earings because they believed it improved their eyesight";
case 10: return "20th March is Snowman Burning day to celebrate the end of winter";
case 0: return "According to circus superstition, it's unlucky to wear green in the ring, hopefully you'll be okay!";
case 1: return "A 'josser' is an outsider who joins the circus!";
case 2: return "The word clown is believed to come from the Icelandic word klunni, meaning a clumsy person!";
case 3: return "A street mime was so committed that he actually got stuck in his imaginary box and died of starvation!";
case 4: return "Banging your head against the wall burns 150 calories an hour!";
case 5: return "29th May is officially 'Put a Pillow on your Fridge Day'!";
case 6: return "in 2017 more people were kiled from injuries caused by taking a selfie than by shark attacks!";
case 7: return "Did you know Honey Bees can recognise human faces!";
case 8: return "A small child could swim through the veins of a Blue Whale!";
case 9: return "pirates wore earings because they believed it improved their eyesight!";
case 10: return "20th March is Snowman Burning day to celebrate the end of winter!";
case 11: return "Sometimes it sounds like Simon is trying to communicate, I wonder what he's saying!";
case 12: return "It takes 11 clowns to screw in a lightbulb, 10 to make the pyramid, then one more to put in the light bulb!";
case 13: return "I heard there was a flying circus run by a group called Monty Python, Maybe one day I can join!";
default:
return "...";
}
......@@ -116,62 +126,120 @@ public class SilasSpeech : MonoBehaviour, Character {
private void conversationStage1() {
if (GameManager.HasTalkedToAhava) {
conversation.Enqueue("HaHaHa got you! Thought i was a mime didnt ya?");
responseQueue.Enqueue(new string[] { "wow you fooled me!", "nah not really" });
conversation.Enqueue("HaHaHa got you! Thought i was a mime didnt ya?!");
responseQueue.Enqueue(new string[] { "wow you fooled m...", "nah not reall..." });
conversation.Enqueue("The names Silas, they call me the unspeakable round here");
responseQueue.Enqueue(new string[] { "why is that", "cant think why" });
conversation.Enqueue("The names Silas, they call me the unspeakable round here!");
responseQueue.Enqueue(new string[] { "why is tha...", "cant think wh...", "slow down plea..." });
conversation.Enqueue("Not really sure why they call me unspeakable but it sounds cool doesnt it.");
responseQueue.Enqueue(new string[] { "Yes!", "people are taking the piss m8" });
conversation.Enqueue("Not really sure why they call me unspeakable but it sounds cool doesnt it!");
responseQueue.Enqueue(new string[] { "Yes!", "people are joking arou...", "I'm learning why fa..." });
conversation.Enqueue("anyway have you seen my show 'Mime Mime' its the talk of the circus");
responseQueue.Enqueue(new string[] { "not yet", "ive played it!", "isnt that just a rip off?" });
conversation.Enqueue("anyway have you seen my show 'Mime Mime' its the talk of the circus!");
responseQueue.Enqueue(new string[] { "not ye...", "ive played i...!", "isnt that just a rip off of Dance dance revo..." });
conversation.Enqueue("...well its mostly just me talking about it but they say its the best");
responseQueue.Enqueue(new string[] { "keep talking!", "okay stop now" });
responseQueue.Enqueue(new string[] { "keep talki...!", "okay sto..." });
conversation.Enqueue("...well i say its the best");
responseQueue.Enqueue(new string[] { "It is great!", "please stop talking" });
responseQueue.Enqueue(new string[] { "It is gre...", "please stop talki..." });
} else{
conversation.Enqueue("...");
responseQueue.Enqueue(new string[] { "?" });
responseQueue.Enqueue(new string[] { "?", "=(", "'mime' a wave" });
conversation.Enqueue("....");
responseQueue.Enqueue(new string[] { "?" });
responseQueue.Enqueue(new string[] { "?", "=(", "'mime' an annoyed wave" });
conversation.Enqueue(".......");
responseQueue.Enqueue(new string[] { "?" });
responseQueue.Enqueue(new string[] { "?", "=(", "'mime' a really angry wave" });
conversation.Enqueue("...................................");
responseQueue.Enqueue(new string[] { "?" });
conversation.Enqueue("....Talk to the bearded lady....");
responseQueue.Enqueue(new string[] { "Oh right" });
responseQueue.Enqueue(new string[] { "?", "=(", "'mime' something not family friendly" });
conversation.Enqueue("....Talk to the bearded lady!....");
responseQueue.Enqueue(new string[] { "Oh right", "=)", "'mime' a slight apology" });
}
}
private void conversationStage2() {
conversation.Enqueue("Stage 2 conversation stuff");
responseQueue.Enqueue(new string[] { "Stage 2 response 1", "stage 2 resposne 2" });
conversation.Enqueue("Hey! thanks for dancing with me!");
responseQueue.Enqueue(new string[] { "It was nothi...", "I had a lot of fu...", "maybe one day I can lea..."});
conversation.Enqueue("If you keep dancing like that maybe one day I can copy you!");
responseQueue.Enqueue(new string[] { "I don't thi...", "'Mime' a thumbs up", "That's what I was trying to sa..." });
conversation.Enqueue("Anyways, what do you think of the performance?!");
responseQueue.Enqueue(new string[] { "It's great bu...", "It's oka...", "It's the wors..." });
conversation.Enqueue("Oh I'm so glad you like it! It's so nice to have a partner!");
responseQueue.Enqueue(new string[] { "I like being with you t...", "Can you stop talking so fa...", "that's not wha..." });
conversation.Enqueue("Maybe we can be partners for ever and ever and ever and ever!!!!");
responseQueue.Enqueue(new string[] { "'Mime' a heart", "I'd lik...", "I think we should see other peo..." });
conversation.Enqueue("Talking is so much fun!");
responseQueue.Enqueue(new string[] { "especially with yo...", "sometimes it can b...", "Not with yo..." });
conversation.Enqueue("Especially when I have so much fun stuff to tell you!");
responseQueue.Enqueue(new string[] { "*listen more carefully*", "'mime' a bored expression", "please don..." });
conversation.Enqueue("Stage 2 conversation stuff 2");
responseQueue.Enqueue(new string[] { "Stage 2 response 1", "stage 2 resposne 2" });
}
private void conversationStage3() {
conversation.Enqueue("Stage 3 conversation stuff");
responseQueue.Enqueue(new string[] { "Stage 3 response 1", "stage 3 resposne 2" });
conversation.Enqueue("Phew, you're starting to get real good! Almost as good as me!");
responseQueue.Enqueue(new string[] { "Pant loudly", "I can still feel the swe...", "Maybe you're just taking it too ea..." });
conversation.Enqueue("I bet you're starting to wonder how I'm so on time with the music!");
responseQueue.Enqueue(new string[] { "Years of mime universi...?", "You probably chea...", "Not reall..." });
conversation.Enqueue("It's all about my commimement! I started on slow versions and then sped them up as it became easy!");
responseQueue.Enqueue(new string[] { "That's a great ide...", "Maybe I can do tha...", "That sounds like a lot of wor..." });
conversation.Enqueue("Stage 3 conversation stuff 2");
responseQueue.Enqueue(new string[] { "Stage 3 response 1", "stage 3 resposne 2" });
conversation.Enqueue("I know what you're thinking, being a mime is about fun, not hard work!");
responseQueue.Enqueue(new string[] { "half the fun is in the wor...", "I wasn't thinki...", "nothing about miming is fu..." });
conversation.Enqueue("But sometimes a good mime has to break out of his invisible skill ceiling and climb the rope of success!");
responseQueue.Enqueue(new string[] { "But I need hel...", "Maybe I'll give it a sho...", "that was disgusti..." });
conversation.Enqueue("Don't worry though, I'll be here to keep training you up!");
responseQueue.Enqueue(new string[] { "'Mime' a heart", "thank yo...", "I don't need yo..." });
conversation.Enqueue("And tell you lots of awesome stuff!");
responseQueue.Enqueue(new string[] { "*listen more carefully*", "'mime' a bored expression", "please don..." });
}
private void conversationStage4() {
conversation.Enqueue("Stage 4 conversation stuff");
responseQueue.Enqueue(new string[] { "Stage 4 response 1", "stage 4 resposne 2" });
conversation.Enqueue("It's so amazing how far you've come! It's like you're coming out of your invisible box!");
responseQueue.Enqueue(new string[] { "'mime' rosey red cheeks", "It's almost like it doesn't matter how wel...", "I kno..." });
conversation.Enqueue("No need to be embarressed! I was new and skillful too once!");
responseQueue.Enqueue(new string[] { "I'm not embarres...", "I'm not even that goo...", "How modest of yo..."});
conversation.Enqueue("I just wish there was some way I could reward you for all your hard work!");
responseQueue.Enqueue(new string[] { "A rewa...?", "That's not necessar...", "I don't wan..." });
conversation.Enqueue("I have an idea!");
responseQueue.Enqueue(new string[] { "'mime' excitement?", "really it's oka...", "please sto..." });
conversation.Enqueue("*Simon blows you a kiss*");
responseQueue.Enqueue(new string[] { "'mime' a blow kiss back", "'mime a disturbed expression'", "urgggh..." });
conversation.Enqueue("Hehe, just kidding! *He speaks slower* I have another idea.");
responseQueue.Enqueue(new string[] { "Thanks, but I really don't need a reward.", "'mime' a disturbed expression", "This is getting weird." });
conversation.Enqueue("Go on, say anything you like *he 'mimes' a smile*");
responseQueue.Enqueue(new string[] { "Wait, I can finally finish a sentence?", "this is weird.", "Why won't you just be quiet for two seconds." });
conversation.Enqueue("I'm sorry, I know why they call me Silas the unspeakable *he 'mimes' a sad face*");
responseQueue.Enqueue(new string[] { "How come? *'mime' a sad face*", "oh it's not that bad", "finally it's over" });
conversation.Enqueue("It's cause I talk so fast, it's just that I'm so scared of people not hearing all I have to say. But with you I feel safe!");
responseQueue.Enqueue(new string[] { "I'll always listen to you", "I'm glad you trust me", "Weird friendship, but okay" });
conversation.Enqueue("Now how about talking about some fun stuff!");
responseQueue.Enqueue(new string[] { "*listen more carefully than normal*", "'mime' a bored expression jokingly", "please don't let me stop you" });
conversation.Enqueue("Stage 4 conversation stuff 2");
responseQueue.Enqueue(new string[] { "Stage 4 response 1", "stage 4 resposne 2" });
}
private void loadTutorialConversation()
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class IntroTent : MonoBehaviour {
private BoxCollider2D thisCollider;
public GameObject player;
public GameObject faceCamDisplay;
private float speechBoxTimer;
public Text box;
private GameObject DialogueUI;
private GameObject response;
private ContactFilter2D filter = new ContactFilter2D();
// Use this for initialization
void Start () {
filter.SetLayerMask(LayerMask.GetMask("Player"));
DialogueUI = GameObject.FindWithTag("DialogueUI");
response = GameObject.FindWithTag("ResponsePanel");
thisCollider = GetComponent<BoxCollider2D>();
}
// Update is called once per frame
void Update()
{
CapsuleCollider2D playerCol = player.GetComponent<CapsuleCollider2D>();
Collider2D[] foundPlayers = new Collider2D[1];
if (thisCollider.OverlapCollider(filter, foundPlayers) > 0)
{
{
//speechBoxTimer = Time.time + uptime;
speechBoxTimer = Mathf.Infinity;
DialogueUI.gameObject.SetActive(true);
faceCamDisplay.SetActive(true);
updateFaceCamDisplay();
response.SetActive(false);
box.text = "The warm embrace of the tent calls you to interact";
//setting player reply options
//set the text on the reply buttons
//arrange buttons
}
}
}
public void updateFaceCamDisplay()
{
//set the sign of the scale of the faceDisplay to be equal to the sign of the characters transform
if (DialogueUI.gameObject.activeSelf)
{
Vector3 newScale = faceCamDisplay.transform.localScale;
if (transform.localScale.x > 0)
{
newScale.x = Mathf.Abs(newScale.x);
}
else
{
newScale.x = (-1) * Mathf.Abs(newScale.x);
}
faceCamDisplay.transform.localScale = newScale;
}
}
}
fileFormatVersion: 2
guid: 5129d7d5680834fe88358a8adf14fc14
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
......@@ -9,7 +9,6 @@ public class PaperController : MonoBehaviour {
public Button interactButton;
private Text speechBox;
private GameObject faceCamDisplay;
private Image LevelMeter;
private InputField inputName;
//character response stuff
private Image responsePanel;
......@@ -28,6 +27,7 @@ public class PaperController : MonoBehaviour {
private float speechBoxTimer;
private bool wasInteracting;//prevents other characters from removing the dialogue box that this character is using
private bool playerMoveFade;
public GameObject interactWall;
public Text movementText;
public Image leftArrow;
public Image rightArrow;
......@@ -44,7 +44,6 @@ public class PaperController : MonoBehaviour {
DialogueUI = GameObject.FindWithTag("DialogueUI");
responsePanel = GameObject.FindWithTag("ResponsePanel").GetComponent<Image>();
speechBox = GameObject.FindWithTag("CharacterSpeech").GetComponent<Text>();
LevelMeter = GameObject.FindWithTag("LevelMeter").GetComponent<Image>();
inputName = GameObject.FindWithTag("playerInput").GetComponent<InputField>();
player = GameObject.FindWithTag("Player").GetComponent<GameObject>();
......@@ -56,7 +55,7 @@ public class PaperController : MonoBehaviour {
inputName.gameObject.SetActive(false);
//playerbutton1.gameObject.SetActive(false);
ButtonPress(1);
}
// Update is called once per frame
......@@ -64,7 +63,6 @@ public class PaperController : MonoBehaviour {
{
if(state == 0 && (Input.GetKeyDown(KeyCode.A) || Input.GetKeyDown(KeyCode.D) || Input.GetKeyDown(KeyCode.LeftArrow) || Input.GetKeyDown(KeyCode.RightArrow)))
{
ButtonPress(1);
playerMoveFade = true;
}
......@@ -85,35 +83,34 @@ public class PaperController : MonoBehaviour {
if(old.a <= 0)
{
movementText.gameObject.SetActive(false);
playerMoveFade = false;
}
}
//do things while the player is in range of the character
if (interactable)
{
if (state == 0)
{
ButtonPress(1);
}
if (!interacting)
{
//if player presses up, begin the interaction.
if (Input.GetKeyDown(KeyCode.W) || Input.GetKeyDown(KeyCode.UpArrow) || Input.GetKeyDown(KeyCode.E))
if (state >= 1 && (Input.GetKeyDown(KeyCode.W) || Input.GetKeyDown(KeyCode.UpArrow) || Input.GetKeyDown(KeyCode.E)))
{
interacting = true;
setText(speechBox, characterScript.GreetingMessage(), Mathf.Infinity, characterScript.getResponses());