Reworked options menu as a prefab and changed pause menu a bit. Need to work on option loading (Currently still old mechanic) and jumping cam when striving and looking.
This commit is contained in:
@@ -65,78 +65,7 @@ namespace Assets.Scripts.Menu
|
||||
characterCreation.transform.localScale = new Vector3(0, 0, 0);
|
||||
EventSystem.current.SetSelectedGameObject(GameObject.Find("btnStart"));
|
||||
}
|
||||
|
||||
public string saveVideoSettings()
|
||||
{
|
||||
GameObject resolution = GameObject.Find("dropResolution");
|
||||
GameObject mode = GameObject.Find("dropMode");
|
||||
string result = "";
|
||||
switch (resolution.GetComponent<Dropdown>().value)
|
||||
{
|
||||
case 0:
|
||||
Screen.SetResolution(800, 600, Screen.fullScreenMode);
|
||||
break;
|
||||
case 1:
|
||||
Screen.SetResolution(1280, 800, Screen.fullScreenMode);
|
||||
break;
|
||||
case 2:
|
||||
Screen.SetResolution(1920, 1080, Screen.fullScreenMode);
|
||||
break;
|
||||
}
|
||||
|
||||
switch (mode.GetComponent<Dropdown>().value)
|
||||
{
|
||||
case 0:
|
||||
if (Screen.fullScreenMode != FullScreenMode.Windowed)
|
||||
{
|
||||
Screen.fullScreenMode = FullScreenMode.Windowed;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (Screen.fullScreenMode != FullScreenMode.ExclusiveFullScreen)
|
||||
{
|
||||
Screen.fullScreenMode = FullScreenMode.ExclusiveFullScreen;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (Screen.fullScreenMode != FullScreenMode.FullScreenWindow)
|
||||
{
|
||||
Screen.fullScreenMode = FullScreenMode.FullScreenWindow;
|
||||
}
|
||||
break;
|
||||
}
|
||||
result = result + "Resolution:" + resolution.GetComponent<Dropdown>().value + "\r\n";
|
||||
result = result + "Mode:" + mode.GetComponent<Dropdown>().value;
|
||||
return result;
|
||||
}
|
||||
|
||||
public string saveLanguage()
|
||||
{
|
||||
GameObject language = GameObject.Find("dropLanguage");
|
||||
string result = "";
|
||||
switch (language.GetComponent<Dropdown>().value)
|
||||
{
|
||||
case 0:
|
||||
result = "de";
|
||||
break;
|
||||
case 1:
|
||||
result = "en";
|
||||
break;
|
||||
}
|
||||
result = "Language:" + result;
|
||||
return result;
|
||||
}
|
||||
|
||||
public string saveAudioSettings()
|
||||
{
|
||||
string result = "";
|
||||
float music = GameObject.Find("slideMusic").GetComponent<Slider>().value;
|
||||
float effects = GameObject.Find("slideEffects").GetComponent<Slider>().value;
|
||||
result = result + "Music:" + music + "\r\n";
|
||||
result = result + "Effects:" + effects;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public void loadGame(SceneHandler sceneHandler)
|
||||
{
|
||||
PlayerPrefs.SetInt("isLoad", 1);
|
||||
|
||||
Reference in New Issue
Block a user