PaperSpeech.cs 3.82 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PaperSpeech : MonoBehaviour, Character {

    private Queue<string> conversation = new Queue<string>();
    private Queue<string[]> responseQueue = new Queue<string[]>();

    private string[] currentResponses;
    private bool AskingForName;

    public float getLevel()
    {
        return GameManager.AhavaLevel;
    }

    public string getName()
    {
        return "Ahava";
    }

    public string GreetingMessage()
    {
        loadConversation();

gstuitje's avatar
gstuitje committed
27
28
        currentResponses = new string[] {"Read"};
        return "You encounter a well drawn piece of paper on the ground. You can use the number keys to interact";
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
    }

    public string GoodbyeMessage()
    {
        currentResponses = new string[] { };
        return "The piece of paper attempts to say goodbye, but struggles, because it's a piece of paper.";
    }

    public string ProximityMessage()
    {
        currentResponses = new string[] { };
        return "My beard sense is tingling...";
    }
    public string butthurtGoodbye()
    {
        currentResponses = new string[] { };
        return "Didnt want to admire my glorious beard?";
    }

    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!";
        }
    }

    public string converse()
    {
        if (conversation.Count > 0)
        {
            GameManager.speechState = conversation.Count;
            currentResponses = responseQueue.Dequeue();
            return conversation.Dequeue();
        }
        else
        {
            GameManager.HasTalkedToAhava = true;
            return nothingMoreToSay();
        }
    }

    private void loadConversation()
    {

    }

    public string[] getResponses()
    {
        return currentResponses;
    }

    private void Start()
    {
88

gstuitje's avatar
gstuitje committed
89
90
        conversation.Enqueue("You feel compelled to interact with the piece of paper by pressing the W or up arrow key.");
        responseQueue.Enqueue(new string[] {});
91

gstuitje's avatar
gstuitje committed
92
93
        conversation.Enqueue("You can interact with the paper by using the number keys");
        responseQueue.Enqueue(new string[] {"Read", "Converse", "" });
94
95
        //GameManager.speechState will be the size of the queue when this dequeued
        //make sure to change the check integer in CharacterInteractins when changing dialogue
gstuitje's avatar
gstuitje committed
96
97
        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."});
98

gstuitje's avatar
gstuitje committed
99
100
        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" });
101

gstuitje's avatar
gstuitje committed
102
103
104
        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[] {});
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126

    }

    private void conversationStage2()
    {
        conversation.Enqueue("youre fitting in nicely here " + GameManager.playerName + ", you remind me of Myself when i was younger");
        responseQueue.Enqueue(new string[] { "great", "you were young once?", "thanks mum" });
    }

    private void conversationStage3()
    {
        conversation.Enqueue("Stage 3 conversation stuff");
        responseQueue.Enqueue(new string[] { "Stage 3 response 1", "stage 3 resposne 2" });
    }

    private void conversationStage4()
    {
        conversation.Enqueue("Stage 4 conversation stuff");
        responseQueue.Enqueue(new string[] { "Stage 4 response 1", "stage 4 resposne 2" });
    }

}