Commit 8591d282 authored by Mitchie Maluschnig's avatar Mitchie Maluschnig
Browse files

moved speech scripts into their own folder

parent 03ddc057
...@@ -84,6 +84,7 @@ public class CharacterInteractions : MonoBehaviour { ...@@ -84,6 +84,7 @@ public class CharacterInteractions : MonoBehaviour {
//player exits characters range //player exits characters range
void exitInteractable(){ void exitInteractable(){
interactButton.gameObject.SetActive(false); interactButton.gameObject.SetActive(false);
playerbutton1.gameObject.SetActive(false);
if (interacting) if (interacting)
{ {
setText(speechBox, characterScript.GoodbyeMessage()); setText(speechBox, characterScript.GoodbyeMessage());
......
fileFormatVersion: 2
guid: 8a352c3787fbf35409ab4c52d6c984b2
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
public class AhavaScript : MonoBehaviour, Character { public class AhavaScript : MonoBehaviour, Character {
private Queue<string> conversation = new Queue<string>(); private Queue<string> conversation = new Queue<string>();
void Start() { void Start() {
loadConversation(); loadConversation();
} }
public string GreetingMessage(){ public string GreetingMessage(){
return "Hello Player, I am Ahava"; return "Hello Player, I am Ahava";
} }
public string GoodbyeMessage(){ public string GoodbyeMessage(){
return "See you soon!"; return "See you soon!";
} }
public string ProximityMessage(){ public string ProximityMessage(){
return "My beard sense is tingling..."; return "My beard sense is tingling...";
} }
public string butthurtGoodbye(){ public string butthurtGoodbye(){
return "Didnt want to admire my glorious beard?"; return "Didnt want to admire my glorious beard?";
} }
public string nothingMoreToSay() { public string nothingMoreToSay() {
if (Random.Range(0, 1f) < 0.8) { if (Random.Range(0, 1f) < 0.8) {
return "my beard grows tired of your chitter chatter"; return "my beard grows tired of your chitter chatter";
} else { } else {
return "begone thot!"; return "begone thot!";
} }
} }
public string converse() { public string converse() {
if (conversation.Count > 0) { if (conversation.Count > 0) {
return conversation.Dequeue(); return conversation.Dequeue();
} else { } else {
return nothingMoreToSay(); return nothingMoreToSay();
} }
} }
private void loadConversation() { private void loadConversation() {
conversation.Enqueue("welcome to the circus"); conversation.Enqueue("welcome to the circus");
conversation.Enqueue("line 2"); conversation.Enqueue("line 2");
conversation.Enqueue("line 3"); conversation.Enqueue("line 3");
conversation.Enqueue("line 4"); conversation.Enqueue("line 4");
conversation.Enqueue("line 5"); conversation.Enqueue("line 5");
conversation.Enqueue("line 6"); conversation.Enqueue("line 6");
} }
} }
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
public interface Character { public interface Character {
string GreetingMessage(); string GreetingMessage();
string GoodbyeMessage(); string GoodbyeMessage();
string butthurtGoodbye(); string butthurtGoodbye();
string nothingMoreToSay(); string nothingMoreToSay();
string ProximityMessage(); string ProximityMessage();
string converse(); string converse();
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment