Skip to content

Commit

Permalink
fix: endgame buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
pyoneerC committed Sep 26, 2024
1 parent 46e814a commit cd421ca
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 15 deletions.
36 changes: 24 additions & 12 deletions Assets/Scenes/Reparation.unity
Original file line number Diff line number Diff line change
Expand Up @@ -9326,7 +9326,7 @@ GameObject:
- component: {fileID: 479826998}
- component: {fileID: 479827000}
m_Layer: 5
m_Name: Image
m_Name: Googles Mask
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
Expand Down Expand Up @@ -9366,7 +9366,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 0, b: 0, a: 1}
m_RaycastTarget: 1
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
Expand Down Expand Up @@ -19963,9 +19963,9 @@ MonoBehaviour:
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_HighlightedColor: {r: 0.4392157, g: 0.89411765, b: 1, a: 1}
m_PressedColor: {r: 0, g: 1, b: 0.98039216, a: 1}
m_SelectedColor: {r: 0.69803923, g: 0.69803923, b: 0.69803923, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
Expand Down Expand Up @@ -19999,7 +19999,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
Expand Down Expand Up @@ -32898,9 +32898,9 @@ MonoBehaviour:
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_HighlightedColor: {r: 0.43867922, g: 0.89534694, b: 1, a: 1}
m_PressedColor: {r: 0, g: 1, b: 0.979579, a: 1}
m_SelectedColor: {r: 0.6981132, g: 0.6981132, b: 0.6981132, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
Expand All @@ -32919,7 +32919,19 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 1480355433}
m_OnClick:
m_PersistentCalls:
m_Calls: []
m_Calls:
- m_Target: {fileID: 0}
m_TargetAssemblyTypeName:
m_MethodName:
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName:
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &1480355433
MonoBehaviour:
m_ObjectHideFlags: 0
Expand All @@ -32934,7 +32946,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
Expand Down Expand Up @@ -34321,7 +34333,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
Expand Down
9 changes: 6 additions & 3 deletions Assets/Scripts/UI/Endgame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ private void Start()
restartButton.gameObject.SetActive(false);
quitButton.gameObject.SetActive(false);

restartButton.onClick.AddListener(() => { UnityEngine.SceneManagement.SceneManager.LoadScene(0); });
quitButton.onClick.AddListener(Application.Quit);

_timePlayed = Time.time;

SetExplanationTextVisibility(0);
Expand Down Expand Up @@ -138,6 +135,12 @@ private void UpdateUI()

restartButton.gameObject.SetActive(true);
quitButton.gameObject.SetActive(true);

restartButton.interactable = true;
quitButton.interactable = true;

restartButton.onClick.AddListener(() => { UnityEngine.SceneManagement.SceneManager.LoadScene(0); });
quitButton.onClick.AddListener(Application.Quit);
}

private void SetTextVisibility(bool visible)
Expand Down

0 comments on commit cd421ca

Please sign in to comment.