change some scripts
This commit is contained in:
parent
47fa2ba969
commit
2fe6417d63
4 changed files with 22 additions and 4 deletions
|
@ -275515,6 +275515,7 @@ MonoBehaviour:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
gameManager: {fileID: 278618526}
|
gameManager: {fileID: 278618526}
|
||||||
nextSceneName: Town
|
nextSceneName: Town
|
||||||
|
Day3: Day3
|
||||||
confirmationPanel: {fileID: 347656170}
|
confirmationPanel: {fileID: 347656170}
|
||||||
warningText: {fileID: 1839460625}
|
warningText: {fileID: 1839460625}
|
||||||
warningPanel: {fileID: 1776114648}
|
warningPanel: {fileID: 1776114648}
|
||||||
|
|
|
@ -276572,6 +276572,7 @@ MonoBehaviour:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
gameManager: {fileID: 278618526}
|
gameManager: {fileID: 278618526}
|
||||||
nextSceneName: Town
|
nextSceneName: Town
|
||||||
|
Day3: Day3
|
||||||
confirmationPanel: {fileID: 347656170}
|
confirmationPanel: {fileID: 347656170}
|
||||||
warningText: {fileID: 1839460625}
|
warningText: {fileID: 1839460625}
|
||||||
warningPanel: {fileID: 1776114648}
|
warningPanel: {fileID: 1776114648}
|
||||||
|
|
|
@ -142,11 +142,11 @@ public class InfoCollector : MonoBehaviour
|
||||||
|
|
||||||
if (obj.name == "Bottles")
|
if (obj.name == "Bottles")
|
||||||
// Returns predefined information
|
// Returns predefined information
|
||||||
return "Saw daddy drink this... I like how it numbs the pain";
|
return "Saw dad drink this... I like how it numbs the pain";
|
||||||
|
|
||||||
if (obj.name == "Cigarettes")
|
if (obj.name == "Cigarettes")
|
||||||
// Returns predefined information
|
// Returns predefined information
|
||||||
return "Stole this from mommy. I hope she doesn't find out.";
|
return "Stole this from mom. I hope she doesn't find out.";
|
||||||
|
|
||||||
if (obj.name == "Penknife")
|
if (obj.name == "Penknife")
|
||||||
// Returns predefined information
|
// Returns predefined information
|
||||||
|
|
|
@ -16,6 +16,7 @@ public class LeaveHouseTrigger : MonoBehaviour
|
||||||
|
|
||||||
// Name of the next scene
|
// Name of the next scene
|
||||||
public string nextSceneName;
|
public string nextSceneName;
|
||||||
|
public string Day3;
|
||||||
public GameObject confirmationPanel;
|
public GameObject confirmationPanel;
|
||||||
public TMP_Text warningText;
|
public TMP_Text warningText;
|
||||||
public GameObject warningPanel;
|
public GameObject warningPanel;
|
||||||
|
@ -38,10 +39,19 @@ public class LeaveHouseTrigger : MonoBehaviour
|
||||||
void ShowConfirmationButtons()
|
void ShowConfirmationButtons()
|
||||||
{
|
{
|
||||||
confirmationPanel.SetActive(true);
|
confirmationPanel.SetActive(true);
|
||||||
warningText.text = "Am I sure I want to leave the house? I might not have completed everything...";
|
if (gameManager.currentDay == 1)
|
||||||
|
{
|
||||||
|
warningText.text = "Should I leave the house? I might not have completed everything...";
|
||||||
StartCoroutine(HideWarningPanelAfterDelay(7f)); // can change how long you want the text to show for
|
StartCoroutine(HideWarningPanelAfterDelay(7f)); // can change how long you want the text to show for
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (gameManager.currentDay == 2)
|
||||||
|
{
|
||||||
|
warningText.text = "Do I even want to go to school...";
|
||||||
|
StartCoroutine(HideWarningPanelAfterDelay(7f)); // can change how long you want the text to show for
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
IEnumerator HideWarningPanelAfterDelay(float delay)
|
IEnumerator HideWarningPanelAfterDelay(float delay)
|
||||||
{
|
{
|
||||||
yield return new WaitForSeconds(delay);
|
yield return new WaitForSeconds(delay);
|
||||||
|
@ -61,5 +71,11 @@ public class LeaveHouseTrigger : MonoBehaviour
|
||||||
{
|
{
|
||||||
confirmationPanel.SetActive(false);
|
confirmationPanel.SetActive(false);
|
||||||
warningPanel.SetActive(true);
|
warningPanel.SetActive(true);
|
||||||
|
|
||||||
|
if (gameManager.currentDay == 2)
|
||||||
|
{
|
||||||
|
gameManager.IncrementDay();
|
||||||
|
SceneManager.LoadScene(Day3);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue