Commit 000f2c7f authored by mmaluschnig's avatar mmaluschnig
Browse files

player now can hit enter after entering name (its properly prompted now) and...

player now can hit enter after entering name (its properly prompted now) and the next dialogue will be displayed
parent 5a89134c
<Properties StartupConfiguration="{67A4F128-F6AC-CD88-DA35-F29416A0792A}|">
<MonoDevelop.Ide.ItemProperties.Assembly-CSharp PreferredExecutionTarget="Unity.Editor" />
<MonoDevelop.Ide.Workbench ActiveDocument="Assets/Scripts/DaytimeScripts/CharacterSpeech/AhavaSpeech.cs">
<Files>
<File FileName="Assets/Scripts/DaytimeScripts/CharacterSpeech/AhavaSpeech.cs" Line="1" Column="1" />
</Files>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore />
</MonoDevelop.Ide.DebuggingService.Breakpoints>
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
<MultiItemStartupConfigurations />
</Properties>
\ No newline at end of file
......@@ -1196,7 +1196,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 178d09aa2704a45b68d85008d69c7e95, type: 3}
m_Name:
m_EditorClassIdentifier:
pauseMenu: {fileID: 1586100788}
Ahava: {fileID: 1684358589}
--- !u!4 &241155501
Transform:
m_ObjectHideFlags: 0
......@@ -7490,7 +7490,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 54.998962, y: -89.570015}
m_AnchoredPosition: {x: 54.9989, y: -89.570015}
m_SizeDelta: {x: -130, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &865213187
......@@ -28458,11 +28458,6 @@ SpriteRenderer:
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!223 &1586100788 stripped
Canvas:
m_CorrespondingSourceObject: {fileID: 223530405003063200, guid: a6dd0ddad611645efbc5ef92c67041a7,
type: 2}
m_PrefabInternal: {fileID: 1532274092}
--- !u!4 &1603416592 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 4885089913599246, guid: 2c7917ac87eca42679b31ab33e2eec29,
......@@ -28535,6 +28530,11 @@ Transform:
m_Father: {fileID: 836855645}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1684358589 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 1201578362876714, guid: 2c7917ac87eca42679b31ab33e2eec29,
type: 2}
m_PrefabInternal: {fileID: 1109435144}
--- !u!1001 &1756462862
Prefab:
m_ObjectHideFlags: 0
......
......@@ -12,6 +12,7 @@ public class CharacterInteractions : MonoBehaviour {
private GameObject faceCamDisplay;
private Image LevelMeter;
private InputField inputName;
private string currentSpeech;
//character response stuff
private Image responsePanel;
public Button[] playerResponses;
......@@ -110,6 +111,7 @@ public class CharacterInteractions : MonoBehaviour {
{
ButtonPress(4);
}
}
}
}
......@@ -162,6 +164,7 @@ public class CharacterInteractions : MonoBehaviour {
DialogueUI.gameObject.SetActive(true);
updateFaceCamDisplay();
box.text = text;
currentSpeech = text;
LevelMeter.fillAmount = characterScript.getLevel() % 1;
print(text);
//setting player reply options
......@@ -177,7 +180,12 @@ public class CharacterInteractions : MonoBehaviour {
playerResponses[i].GetComponent<RectTransform>().localPosition = newPos;
playerResponses[i].gameObject.SetActive(true);
playerResponses[i].GetComponentInChildren<Text>().text = "(" + (i + 1) + ") " + replies[i];
if (!DaytimeManager.enteringName)
{
playerResponses[i].GetComponentInChildren<Text>().text = "(" + (i + 1) + ") " + replies[i];
}else{
playerResponses[i].GetComponentInChildren<Text>().text = "(Enter)" + replies[i];
}
} else {
playerResponses[i].gameObject.SetActive(false);
......@@ -199,7 +207,13 @@ public class CharacterInteractions : MonoBehaviour {
}
}
public void ButtonPress(int buttonNum) {
if (interacting) {
if (interacting && buttonNum <= 3) {
converse();
}
}
public void ProgressConversation(){
if(characterScript.getName() == "Ahava"){
converse();
}
}
......
......@@ -107,7 +107,7 @@ public class AhavaSpeech : MonoBehaviour, Character {
//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("Since your now one of us, what shall your stage name be?");
responseQueue.Enqueue(new string[] {"okay"});
responseQueue.Enqueue(new string[] {"Thats me!"});
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" });
......
......@@ -8,13 +8,12 @@ public class DaytimeManager : MonoBehaviour {
public static float groundLevel = -4;
public Canvas pauseMenu;
private bool pauseMenuActive = false;
public GameObject Ahava;
public static bool enteringName;
void Start() {
pauseMenu.gameObject.SetActive(false);
float newLevel = 1
+ GameManager.JohnLevel - 1
......@@ -45,5 +44,6 @@ public class DaytimeManager : MonoBehaviour {
print(GameManager.playerName);
name.SetActive(false);
enteringName = false;
Ahava.GetComponent<CharacterInteractions>().ProgressConversation();
}
}
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