Commit 6ede53a8 authored by mmaluschnig's avatar mmaluschnig
Browse files

gave more room to player responses and spaced them a bit better

parent b05ae581
......@@ -729,7 +729,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: -21}
m_SizeDelta: {x: 300, y: 22}
m_SizeDelta: {x: 320, y: 24.9}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &134449647
MonoBehaviour:
......@@ -757,7 +757,7 @@ MonoBehaviour:
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 7
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
......@@ -1103,8 +1103,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 63.5, y: -96.84}
m_SizeDelta: {x: -147, y: 173.57}
m_AnchoredPosition: {x: 63.5, y: -104.26001}
m_SizeDelta: {x: -147, y: 188.42}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &237130076
MonoBehaviour:
......@@ -1913,7 +1913,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: -21}
m_SizeDelta: {x: 300, y: 22}
m_SizeDelta: {x: 320, y: 24.9}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &511771229
MonoBehaviour:
......@@ -1941,7 +1941,7 @@ MonoBehaviour:
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 7
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
......@@ -7161,7 +7161,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: -21}
m_SizeDelta: {x: 300, y: 22}
m_SizeDelta: {x: 320, y: 24.9}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &832870305
MonoBehaviour:
......@@ -7189,7 +7189,7 @@ MonoBehaviour:
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 7
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
......@@ -7421,8 +7421,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 55, y: 20}
m_SizeDelta: {x: -130, y: 28}
m_AnchoredPosition: {x: 55, y: 27.424995}
m_SizeDelta: {x: -130, y: 42.849}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &850495251
MonoBehaviour:
......@@ -12288,7 +12288,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: -21}
m_SizeDelta: {x: 300, y: 22}
m_SizeDelta: {x: 320, y: 24.9}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &928319864
MonoBehaviour:
......@@ -12316,7 +12316,7 @@ MonoBehaviour:
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 7
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
......@@ -12693,7 +12693,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 'Jimbo
m_Text: 'Lech
 
'
--- !u!222 &1021047125
......
......@@ -166,18 +166,28 @@ public class CharacterInteractions : MonoBehaviour {
box.text = text;
currentSpeech = text;
LevelMeter.fillAmount = characterScript.getLevel() % 1;
print(text);
//print(text);
//setting player reply options
for (int i = 0; i < playerResponses.Length; i++) {
//find spacing to arrange buttons
float spacing = responsePanel.rectTransform.rect.width / (replies.Length + 1);
float sideSpacing = 90;
float spacing = (responsePanel.rectTransform.rect.width - 2*sideSpacing) / (replies.Length - 1);
//set the text on the reply buttons
if (i < replies.Length) {
//arrange buttons
Vector2 newPos = playerResponses[i].GetComponent<RectTransform>().localPosition;
float panelEdge = responsePanel.rectTransform.rect.xMin;
newPos.x = panelEdge + (spacing * (i+1));
playerResponses[i].GetComponent<RectTransform>().localPosition = newPos;
if (replies.Length == 1)
{
float YPos = playerResponses[i].GetComponent<RectTransform>().localPosition.y;
playerResponses[i].GetComponent<RectTransform>().localPosition = new Vector3(0,YPos,0);
}
else
{
//arrange buttons
Vector2 newPos = playerResponses[i].GetComponent<RectTransform>().localPosition;
float panelEdge = responsePanel.rectTransform.rect.xMin;
newPos.x = panelEdge + sideSpacing + (spacing * i);
playerResponses[i].GetComponent<RectTransform>().localPosition = newPos;
}
playerResponses[i].gameObject.SetActive(true);
if (!DaytimeManager.enteringName)
......@@ -214,7 +224,7 @@ public class CharacterInteractions : MonoBehaviour {
public void ProgressConversation(){
if(characterScript.getName() == "Ahava"){
converse();
setText(speechBox, GameManager.playerName + "? " + characterScript.converse(), Mathf.Infinity, characterScript.getResponses());
}
}
......
......@@ -109,7 +109,7 @@ public class AhavaSpeech : MonoBehaviour, Character {
conversation.Enqueue("Since your now one of us, what shall your stage name be?");
responseQueue.Enqueue(new string[] {"Thats me!"});
conversation.Enqueue("Great Name! How about we call you John Smith instead");
conversation.Enqueue("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" });
conversation.Enqueue("You can call me Baird... Ahava Baird, And i shall call you Dennnis");
......
......@@ -23,7 +23,6 @@ public class DaytimeManager : MonoBehaviour {
print("diff" + diffinLevels);
print("start" + GameManager.AhavaLevel % 1);
if ((GameManager.AhavaLevel % 1) + diffinLevels > 1) {
print("gere");
GameManager.AhavaLevelUp = true;
}
GameManager.AhavaLevel = newLevel;
......@@ -40,7 +39,15 @@ public class DaytimeManager : MonoBehaviour {
}
public void changePlayerName(GameObject name) {
GameManager.playerName = name.GetComponent<InputField>().text;
string newName = name.GetComponent<InputField>().text;
if (newName == "")
{
GameManager.playerName = "Lech";
}
else
{
GameManager.playerName = newName;
}
print(GameManager.playerName);
name.SetActive(false);
enteringName = false;
......
fileFormatVersion: 2
guid: 038a612a63b4e416e8ea04c2d651ab75
folderAsset: yes
DefaultImporter:
externalObjects: {}
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