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 {
//player exits characters range
void exitInteractable(){
interactButton.gameObject.SetActive(false);
playerbutton1.gameObject.SetActive(false);
if (interacting)
{
setText(speechBox, characterScript.GoodbyeMessage());
......
fileFormatVersion: 2
guid: 8a352c3787fbf35409ab4c52d6c984b2
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class AhavaScript : MonoBehaviour, Character {
private Queue<string> conversation = new Queue<string>();
void Start() {
loadConversation();
}
public string GreetingMessage(){
return "Hello Player, I am Ahava";
}
public string GoodbyeMessage(){
return "See you soon!";
}
public string ProximityMessage(){
return "My beard sense is tingling...";
}
public string butthurtGoodbye(){
return "Didnt want to admire my glorious beard?";
}
public string nothingMoreToSay() {
if (Random.Range(0, 1f) < 0.8) {
return "my beard grows tired of your chitter chatter";
} else {
return "begone thot!";
}
}
public string converse() {
if (conversation.Count > 0) {
return conversation.Dequeue();
} else {
return nothingMoreToSay();
}
}
private void loadConversation() {
conversation.Enqueue("welcome to the circus");
conversation.Enqueue("line 2");
conversation.Enqueue("line 3");
conversation.Enqueue("line 4");
conversation.Enqueue("line 5");
conversation.Enqueue("line 6");
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class AhavaScript : MonoBehaviour, Character {
private Queue<string> conversation = new Queue<string>();
void Start() {
loadConversation();
}
public string GreetingMessage(){
return "Hello Player, I am Ahava";
}
public string GoodbyeMessage(){
return "See you soon!";
}
public string ProximityMessage(){
return "My beard sense is tingling...";
}
public string butthurtGoodbye(){
return "Didnt want to admire my glorious beard?";
}
public string nothingMoreToSay() {
if (Random.Range(0, 1f) < 0.8) {
return "my beard grows tired of your chitter chatter";
} else {
return "begone thot!";
}
}
public string converse() {
if (conversation.Count > 0) {
return conversation.Dequeue();
} else {
return nothingMoreToSay();
}
}
private void loadConversation() {
conversation.Enqueue("welcome to the circus");
conversation.Enqueue("line 2");
conversation.Enqueue("line 3");
conversation.Enqueue("line 4");
conversation.Enqueue("line 5");
conversation.Enqueue("line 6");
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public interface Character {
string GreetingMessage();
string GoodbyeMessage();
string butthurtGoodbye();
string nothingMoreToSay();
string ProximityMessage();
string converse();
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public interface Character {
string GreetingMessage();
string GoodbyeMessage();
string butthurtGoodbye();
string nothingMoreToSay();
string ProximityMessage();
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