Small improvement at Tutorial

You can exit now with "Previous" input the Tutorial
This commit is contained in:
MarcUs7 2024-12-28 22:53:12 +01:00
parent cfd12db62b
commit 022b621bcb
2 changed files with 12 additions and 7 deletions

View file

@ -3778,9 +3778,9 @@ MonoBehaviour:
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1769907043}
m_TargetAssemblyTypeName: MainMenu, Assembly-CSharp
m_MethodName: LevelSelect
- m_Target: {fileID: 1570864309}
m_TargetAssemblyTypeName: Tutorial, Assembly-CSharp
m_MethodName: PreviousPage
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}

View file

@ -48,11 +48,16 @@ public class Tutorial : MonoBehaviour
public void PreviousPage()
{
if (_currentPage > 0)
switch (_currentPage)
{
menus[_currentPage].SetActive(false);
_currentPage--;
menus[_currentPage].SetActive(true);
case 0:
_mainMenu.LevelSelect();
break;
case > 0:
menus[_currentPage].SetActive(false);
_currentPage--;
menus[_currentPage].SetActive(true);
break;
}
if (_currentPage == menus.Length - 2)