Reworked main menu to be a bit more "modern"

This commit is contained in:
finnchen123
2026-01-25 11:40:22 +01:00
parent 467f6a78e2
commit eea4992538
5 changed files with 187 additions and 1704 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -24,8 +24,8 @@ namespace Assets.Scripts
}
if (!hasSceneHandler)
{
DontDestroyOnLoad(this.gameObject);
this.gameObject.name = "SceneHandlerLoaded";
DontDestroyOnLoad(gameObject);
gameObject.name = "SceneHandlerLoaded";
}
}

View File

@@ -22,29 +22,13 @@ namespace Assets.Scripts.Menu
FileHandler.loadOptions(false);
options.transform.localScale = new Vector3(0,0,0);
characterCreation.transform.localScale = new Vector3(0,0,0);
mainMenu.transform.localScale = new Vector3(1,1,1);
SteamWorksHandler.getStandardAchievement("StartAchievement");
EventSystem.current.SetSelectedGameObject(GameObject.Find("btnStart"));
}
public void startGame(SceneHandler sceneHandler)
{
int cityAmount = 0;
switch (GameObject.Find("dropSize").GetComponent<Dropdown>().value)
{
case 0:
cityAmount = 5;
break;
case 1:
cityAmount = 10;
break;
case 2:
cityAmount = 20;
break;
case 3:
cityAmount = 40;
break;
}
int cityAmount = GameObject.Find("dropSize").GetComponent<Dropdown>().value * 5 + 5;
PlayerPrefs.SetInt("cityAmount", cityAmount);
PlayerPrefs.SetInt("class", GameObject.Find("dropClass").GetComponent<Dropdown>().value);
PlayerPrefs.SetInt("race", GameObject.Find("dropRace").GetComponent<Dropdown>().value);
@@ -102,7 +86,6 @@ namespace Assets.Scripts.Menu
{
options.transform.localScale = new Vector3(0,0,0);
characterCreation.transform.localScale = new Vector3(1,1,1);
mainMenu.transform.localScale = new Vector3(0,0,0);
EventSystem.current.SetSelectedGameObject(GameObject.Find("inName"));
}
@@ -110,7 +93,6 @@ namespace Assets.Scripts.Menu
{
options.transform.localScale = new Vector3(0,0,0);
characterCreation.transform.localScale = new Vector3(0,0,0);
mainMenu.transform.localScale = new Vector3(1,1,1);
EventSystem.current.SetSelectedGameObject(GameObject.Find("btnStart"));
}
@@ -118,7 +100,6 @@ namespace Assets.Scripts.Menu
{
options.transform.localScale = new Vector3(1,1,1);
characterCreation.transform.localScale = new Vector3(0,0,0);
mainMenu.transform.localScale = new Vector3(0,0,0);
FileHandler.loadOptionDisplay();
EventSystem.current.SetSelectedGameObject(GameObject.Find("btnAudio"));
showOptionView("audio");
@@ -128,7 +109,6 @@ namespace Assets.Scripts.Menu
{
options.transform.localScale = new Vector3(0,0,0);
characterCreation.transform.localScale = new Vector3(0,0,0);
mainMenu.transform.localScale = new Vector3(1,1,1);
EventSystem.current.SetSelectedGameObject(GameObject.Find("btnStart"));
}