Commit 1a1dea1d authored by Mitchie Maluschnig's avatar Mitchie Maluschnig
Browse files

fixed instant transition to *Super secret ending* on first interactin with ahava

parent f966b6bf
......@@ -226,11 +226,12 @@ public class CharacterInteractions : MonoBehaviour {
}
}
public void ButtonPress(int buttonNum) {
if(GameManager.ConversationStage == 4 && characterScript.getName() == "Ahava" && GameManager.speechState == 1 && !GameManager.hasCompletedTheGame){
if (interacting && buttonNum <= 3) {
converse();
if (GameManager.ConversationStage == 4 && characterScript.getName() == "Ahava" && GameManager.speechState == 1 && !GameManager.hasCompletedTheGame) {
SceneManager.LoadScene("BeardMenu");
GameManager.hasCompletedTheGame = true;
}else if (interacting && buttonNum <= 3) {
converse();
}
}
}
......
......@@ -195,6 +195,9 @@ public class AhavaSpeech : MonoBehaviour, Character {
conversation.Enqueue("Here, take this, it's dangerous to go alone");
responseQueue.Enqueue(new string[] { "...", "This is the end?", "This really isn't necessary" });
conversation.Enqueue("Here, take this, it's dangerous to go alone");
responseQueue.Enqueue(new string[] { "...", "This is the end?", "This really isn't necessary" });
}
......
......@@ -20,7 +20,7 @@ public class DaytimeManager : MonoBehaviour {
+ ((GameManager.JohnLevel-1) * 0.5f)
+ ((GameManager.SilasLevel-1) * 0.5f)
+ ((GameManager.SimonLevel-1)*0.5f);
if (newLevel > 4) newLevel = 4;
if (newLevel > 4.99f) newLevel = 4.99f;
float diffinLevels = newLevel - GameManager.AhavaLevel;
print("diff" + diffinLevels);
......
......@@ -14,6 +14,7 @@ public class GameManager : MonoBehaviour {
private static bool SilasLevelUp = true;
private static bool SimonLevelUp = true;
private static bool JohnLevelUp = true;
private static float MAX_CHARACTER_LEVEL = 4.99f;
public static string playerName = "Dennis";
......@@ -44,18 +45,21 @@ public class GameManager : MonoBehaviour {
SimonLevelUp = true;
}
SimonLevel += points;
if (SimonLevel >= MAX_CHARACTER_LEVEL) SimonLevel = MAX_CHARACTER_LEVEL;
}
if (name == "Silas") {
if ((SilasLevel % 1) + points > 1) {
SilasLevelUp = true;
}
SilasLevel += points;
if (SilasLevel >= MAX_CHARACTER_LEVEL) SilasLevel = MAX_CHARACTER_LEVEL;
}
if (name == "John") {
if ((JohnLevel % 1) + points > 1) {
JohnLevelUp = true;
}
JohnLevel += points;
if (JohnLevel >= MAX_CHARACTER_LEVEL) JohnLevel = MAX_CHARACTER_LEVEL;
}
}
......
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