This commit is contained in:
Christer Warén
2022-04-01 08:47:42 +03:00
parent 1ab4724225
commit e15e813614
13 changed files with 853 additions and 45 deletions

View File

@@ -4,10 +4,8 @@ MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences:
- MainMenuPanel: {fileID: 8730269676052092079, guid: 95c270678e350c64e9b476d7f28a859d,
type: 3}
- SettingsMenuPanel: {fileID: 7135312091190565530, guid: 09acfb5a6df9ae1458aea9c3923a799b,
type: 3}
- MainMenuPanel: {instanceID: 0}
- SettingsMenuPanel: {instanceID: 0}
executionOrder: 0
icon: {instanceID: 0}
userData:

View File

@@ -2,16 +2,20 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Audio;
using UnityEngine.UI;
public class SettingsMenu : MonoBehaviour
{
public AudioMixer audioMixer;
public void setVolume (float volume){
audioMixer.SetFloat("volume", volume);
}
public Slider volumeSlider;
void Start(){
audioMixer.SetFloat("volume", -30);
volumeSlider.value = PlayerPrefs.GetFloat("volume", -0.30f);
audioMixer.SetFloat("volume", PlayerPrefs.GetFloat("volume", -0.30f));
}
public void setVolume (float volume){
PlayerPrefs.SetFloat("volume", volume);
audioMixer.SetFloat("volume", volume);
}
}

View File

@@ -3,7 +3,9 @@ guid: 0f70ad7df61e46f4193f65c69cff1ce8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
defaultReferences:
- audioMixer: {fileID: 24100000, guid: 5a3abbd28329b73439a81ec45b2d1906, type: 2}
- volumeSlider: {instanceID: 0}
executionOrder: 0
icon: {instanceID: 0}
userData:

View File

@@ -4,7 +4,7 @@ using System.Collections.Specialized;
using UnityEngine;
using UnityEngine.UI;
public class DebugRespawn : MonoBehaviour
public class Game : MonoBehaviour
{
public Button button;
private GameObject player;
@@ -23,8 +23,8 @@ public class DebugRespawn : MonoBehaviour
void Respawn()
{
rbody.velocity = new Vector3(0, 0, 0);
player.transform.position = new Vector3(-7, -2, -0.16f);
camera.transform.position = new Vector3(0.9002959f, 2.056212f, -32.28906f);
player.transform.position = new Vector3(-60.5f, 9.3f, -0.16f);
camera.transform.position = new Vector3(-51.7597f, 14.07621f, -32.28906f);
//CameraController.storedPosition = 0f;
}
}