Commit 3a15d73f authored by StonegazeFIN's avatar StonegazeFIN
Browse files

Updated Main menu.

MainMenu.cs sets the credits automatically. Why? Because for funzies.
parent d873382f
......@@ -54,5 +54,71 @@ MonoBehaviour:
audioClip: {fileID: 8300000, guid: f82c24c9bc80f8547a9c40aafc328e48, type: 3}
- sound: 6
audioClip: {fileID: 8300000, guid: 5a70ac223d26d4a449fefb7394ad970a, type: 3}
VoiceAudioClipArray: []
VoiceAudioClipArray:
- voice: 0
audioClip: {fileID: 0}
- voice: 1
audioClip: {fileID: 0}
- voice: 2
audioClip: {fileID: 0}
- voice: 3
audioClip: {fileID: 0}
- voice: 4
audioClip: {fileID: 0}
- voice: 5
audioClip: {fileID: 0}
- voice: 6
audioClip: {fileID: 0}
- voice: 7
audioClip: {fileID: 0}
- voice: 8
audioClip: {fileID: 0}
- voice: 9
audioClip: {fileID: 0}
- voice: 10
audioClip: {fileID: 0}
- voice: 11
audioClip: {fileID: 0}
- voice: 12
audioClip: {fileID: 0}
- voice: 13
audioClip: {fileID: 0}
- voice: 14
audioClip: {fileID: 0}
- voice: 15
audioClip: {fileID: 0}
- voice: 16
audioClip: {fileID: 0}
- voice: 17
audioClip: {fileID: 0}
- voice: 18
audioClip: {fileID: 0}
- voice: 19
audioClip: {fileID: 0}
- voice: 20
audioClip: {fileID: 0}
- voice: 21
audioClip: {fileID: 0}
- voice: 22
audioClip: {fileID: 0}
- voice: 23
audioClip: {fileID: 0}
- voice: 24
audioClip: {fileID: 0}
- voice: 25
audioClip: {fileID: 0}
- voice: 26
audioClip: {fileID: 0}
- voice: 27
audioClip: {fileID: 0}
- voice: 28
audioClip: {fileID: 0}
- voice: 29
audioClip: {fileID: 0}
- voice: 30
audioClip: {fileID: 0}
- voice: 31
audioClip: {fileID: 0}
- voice: 32
audioClip: {fileID: 0}
GunAudioClipArray: []
This diff is collapsed.
......@@ -16,13 +16,13 @@ public class AudioControls : MonoBehaviour
private void Start()
{
SetAudioVolume(PlayerPrefs.GetFloat("MasterVolume", 20));
SetAudioVolume(PlayerPrefs.GetFloat("AudioVolume", 20));
SetAudioVolume(PlayerPrefs.GetFloat("SfxVolume", 20));
SetAudioVolume(PlayerPrefs.GetFloat("MasterVolume", 0));
SetAudioVolume(PlayerPrefs.GetFloat("AudioVolume", 0));
SetAudioVolume(PlayerPrefs.GetFloat("SfxVolume", 0));
MasterSlider.value = PlayerPrefs.GetFloat("MasterVolume", 20);
SfxSlider.value = PlayerPrefs.GetFloat("SfxVolume", 20);
AudioSlider.value = PlayerPrefs.GetFloat("AudioVolume", 20);
MasterSlider.value = PlayerPrefs.GetFloat("MasterVolume", 0);
SfxSlider.value = PlayerPrefs.GetFloat("SfxVolume", 0);
AudioSlider.value = PlayerPrefs.GetFloat("AudioVolume", 0);
}
......@@ -41,9 +41,9 @@ public class AudioControls : MonoBehaviour
private void OnDisable()
{
float audioVolume = 20;
float sfxVolume = 20;
float masterVolume = 20;
float audioVolume = 0;
float sfxVolume = 0;
float masterVolume = 0;
audioMixer.GetFloat("AudioVolume", out audioVolume);
audioMixer.GetFloat("SfxVolume", out sfxVolume);
......
......@@ -6,17 +6,32 @@ using UnityEngine.SceneManagement;
public class MainMenu : MonoBehaviour
{
public GameObject MainPanel;
public GameObject OptionsPanel;
public GameObject LeaderBoardPanel;
private GameObject CreditsPanel;
private GameObject MainPanel;
private GameObject OptionsPanel;
private GameObject LeaderBoardPanel;
private GameObject CreditsNameList;
private GameObject MainCanvas;
private Vector3 MainMenuStart;
private Vector3 Optionstart;
private Vector3 LeaderBoardStart;
private Text Producer;
private Text Programmer1;
private Text Programmer2;
private Text Programmer3;
private Text Artist1;
private Text Artist2;
private Text Artist3;
private Text Artist4;
public GameObject MainCanvas;
public Vector3 MainMenuStart;
public Vector3 Optionstart;
public Vector3 LeaderBoardStart;
private void Start()
{
Cursor.visible = true;
CreditsPanel = GameObject.Find("CreditsImage");
CreditsNameList = GameObject.Find("CreditsBackground");
MainCanvas = GameObject.Find("MainMenuCanvas");
MainPanel = GameObject.Find("MainMenuPanel");
OptionsPanel = GameObject.Find("OptionsPanel");
......@@ -25,15 +40,33 @@ public class MainMenu : MonoBehaviour
Optionstart = OptionsPanel.transform.position;
LeaderBoardStart = LeaderBoardPanel.transform.position;
MainPanel.transform.position = MainCanvas.transform.position;
MainPanel.SetActive(false);
MainPanel.SetActive(true);
OptionsPanel.SetActive(false);
LeaderBoardPanel.SetActive(false);
CreditsPanel.SetActive(false);
Producer = CreditsNameList.transform.Find("Producer").gameObject.GetComponent<Text>();
Programmer1 = CreditsNameList.transform.Find("Programmer1").gameObject.GetComponent<Text>();
Programmer2 = CreditsNameList.transform.Find("Programmer2").gameObject.GetComponent<Text>();
Programmer3 = CreditsNameList.transform.Find("Programmer3").gameObject.GetComponent<Text>();
Artist1 = CreditsNameList.transform.Find("Artist1").gameObject.GetComponent<Text>();
Artist2 = CreditsNameList.transform.Find("Artist2").gameObject.GetComponent<Text>();
Artist3 = CreditsNameList.transform.Find("Artist3").gameObject.GetComponent<Text>();
Artist4 = CreditsNameList.transform.Find("Artist4").gameObject.GetComponent<Text>();
Initialize();
}
private void Initialize()
{
MainMenuToggle();
Producer.text = "Lasse Kauhanen";
Programmer1.text = "Miguel";
Programmer2.text = "Jere";
Programmer3.text = "Ossi";
Artist1.text = "Matti";
Artist2.text = "Asairan";
Artist3.text = "Naigis";
Artist4.text = "Eetu";
}
public void QuitGame()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment