Commit 409d097d authored by Mitchie Maluschnig's avatar Mitchie Maluschnig
Browse files

startes writing johns tutorial dialogue

parent 664a270f
......@@ -412,6 +412,7 @@ GameObject:
m_Component:
- component: {fileID: 439704336}
- component: {fileID: 439704335}
- component: {fileID: 439704337}
m_Layer: 0
m_Name: JohnSmith
m_TagString: Untagged
......@@ -480,6 +481,17 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 11
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &439704337
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 439704334}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5ef1f31bb4e002f49a21a973cf1a2202, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &542902488
GameObject:
m_ObjectHideFlags: 0
......@@ -1120,6 +1132,7 @@ GameObject:
m_Component:
- component: {fileID: 847592695}
- component: {fileID: 847592694}
- component: {fileID: 847592696}
m_Layer: 0
m_Name: LevelMaster
m_TagString: Untagged
......@@ -1155,6 +1168,23 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &847592696
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 847592693}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 26e44442b199dfa4f901ea661cccbc33, type: 3}
m_Name:
m_EditorClassIdentifier:
dialogueBox: {fileID: 758433178}
faceCam: {fileID: 1531052204}
JohnText: {fileID: 249715420}
John: {fileID: 439704334}
speech: {fileID: 439704337}
button: {fileID: 1207322006}
--- !u!1 &848583036
GameObject:
m_ObjectHideFlags: 0
......@@ -1839,7 +1869,7 @@ MonoBehaviour:
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 0}
- m_Target: {fileID: 847592696}
m_MethodName: ButtonPress
m_Mode: 1
m_Arguments:
......@@ -2266,7 +2296,7 @@ RectTransform:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1482713994}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalPosition: {x: 0, y: 0, z: 9}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 542902489}
......
......@@ -77,7 +77,10 @@ public class JohnSmithSpeech : MonoBehaviour, Character {
conversation.Clear();
responseQueue.Clear();
if ((int)GameManager.getLevel(getName()) == 1) {
if (GameManager.SimonTutorial) {
loadTutorialConversation();
}if ((int)GameManager.getLevel(getName()) == 1) {
conversationStage1();
} else if ((int)GameManager.getLevel(getName()) == 2) {
......@@ -96,6 +99,26 @@ public class JohnSmithSpeech : MonoBehaviour, Character {
return currentResponses;
}
private void loadTutorialConversation() {
conversation.Enqueue("Hey! Welcome to the Trapeze.");
responseQueue.Enqueue(new string[] { "Continue" });
conversation.Enqueue("So nice of you to SWING BY");
responseQueue.Enqueue(new string[] { "Continue" });
conversation.Enqueue("To Swing yourself just hold A to swing left and D to swing right");
responseQueue.Enqueue(new string[] { "Continue" });
conversation.Enqueue("GRR (Just hold down on SPACEBAR to select an angle)");
responseQueue.Enqueue(new string[] { "Continue" });
conversation.Enqueue("grr (Great! Now release SPACEBAR to select your Power and fire the pie)");
responseQueue.Enqueue(new string[] { "Continue" });
conversation.Enqueue("grR (Well Done! See if you can hit the rest)");
responseQueue.Enqueue(new string[] { "Continue" });
}
private void conversationStage1() {
if (GameManager.HasTalkedToAhava) {
conversation.Enqueue("welcome to the circus");
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class TrapezeTutorial : MonoBehaviour {
public GameObject dialogueBox;
public Camera faceCam;
public Text JohnText;
public GameObject John;
public JohnSmithSpeech speech;
public Button button;
private int state;
private void Start() {
GameManager.SimonTutorial = true;
dialogueBox.SetActive(false);
speech.GreetingMessage();
JohnText.text = speech.converse();
StartCoroutine(noticePlayer());
}
private void Update() {
if (Input.GetKeyDown(KeyCode.Space) && GameManager.TutorialState == 1) {
progress();
}
}
private IEnumerator noticePlayer() {
yield return new WaitForSeconds(1);
dialogueBox.SetActive(true);
faceCam.gameObject.SetActive(true);
StopCoroutine(noticePlayer());
}
public void ButtonPress() {
progress();
}
void progress() {
state++;
if (state == 2) {
} else if (state == 3) {
//press space
button.gameObject.SetActive(false);
GameManager.TutorialState = 1;
} else if (state == 4) {
//relese space
GameManager.TutorialState = 2;
} else if (state == 5) {
GameManager.TutorialState = 3;
}
JohnText.text = speech.converse();
}
}
fileFormatVersion: 2
guid: 26e44442b199dfa4f901ea661cccbc33
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
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