added game end screen
also! the new singleton system doesn't work! returning to the main menu creates a second instance of everything, @nick can you fix this please
This commit is contained in:
parent
06ae0ab9c2
commit
a164f3130f
1013
Assets/Scenes/GameEndScreen.unity
Normal file
1013
Assets/Scenes/GameEndScreen.unity
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Scenes/GameEndScreen.unity.meta
Normal file
7
Assets/Scenes/GameEndScreen.unity.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 00a8225591a31417a93122f1eb4e7dff
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -912,6 +912,10 @@ PrefabInstance:
|
|||||||
serializedVersion: 3
|
serializedVersion: 3
|
||||||
m_TransformParent: {fileID: 0}
|
m_TransformParent: {fileID: 0}
|
||||||
m_Modifications:
|
m_Modifications:
|
||||||
|
- target: {fileID: 2527389465697474493, guid: ff99a7d0beeca415e911378b9b377de4, type: 3}
|
||||||
|
propertyPath: showDropdown
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 3422388587178177106, guid: ff99a7d0beeca415e911378b9b377de4, type: 3}
|
- target: {fileID: 3422388587178177106, guid: ff99a7d0beeca415e911378b9b377de4, type: 3}
|
||||||
propertyPath: m_Pivot.x
|
propertyPath: m_Pivot.x
|
||||||
value: 0
|
value: 0
|
||||||
|
@ -17,6 +17,9 @@ public class DialogBoxes : MonoBehaviour
|
|||||||
[SerializeField] Image backgroundImageObject;
|
[SerializeField] Image backgroundImageObject;
|
||||||
[SerializeField] Sprite[] images;
|
[SerializeField] Sprite[] images;
|
||||||
|
|
||||||
|
[Header("Buttons:")]
|
||||||
|
[SerializeField] GameObject backToMenuButton;
|
||||||
|
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
void Start()
|
||||||
@ -37,7 +40,11 @@ public class DialogBoxes : MonoBehaviour
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // no more dialog messages, advance the scene
|
{ // no more dialog messages, advance the scene
|
||||||
SceneController.Instance.NextScene();
|
if (backToMenuButton != null) {
|
||||||
|
backToMenuButton.SetActive(true);
|
||||||
|
} else {
|
||||||
|
SceneController.Instance.NextScene();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,6 +33,15 @@ public class SceneController : MonoBehaviour
|
|||||||
{ // if this is the menu
|
{ // if this is the menu
|
||||||
GameObject.Find("NewGameButton").GetComponent<Button>().onClick.AddListener(NextScene);
|
GameObject.Find("NewGameButton").GetComponent<Button>().onClick.AddListener(NextScene);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if this is the last scene
|
||||||
|
if (scene.buildIndex == (SceneManager.sceneCountInBuildSettings - 1)) {
|
||||||
|
GameObject backToMenuButton = GameObject.Find("BackToMenuButton");
|
||||||
|
if (backToMenuButton != null) {
|
||||||
|
backToMenuButton.GetComponent<Button>().onClick.AddListener(delegate{LoadChosenScene(0);});
|
||||||
|
backToMenuButton.SetActive(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void NextScene()
|
public void NextScene()
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user