public void Quit() { SoundManager.Instance.Stop("Theme"); SoundManager.Instance.Play("Menu"); loader.LoadScene("MainTitle"); Destroy(loader.gameObject); Time.timeScale = 1; }
public bool EndQuest() { //SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1); ProgressSceneLoader sceneLoader = Global.Component.GetProgressSceneLoader(); sceneLoader.LoadScene(SceneManager.GetActiveScene().buildIndex + 1); return(true); }
public void Victory() { //SceneManager.LoadScene("Scene2"); //Sauvegarde de la vie/Data //ICI life = playerLife.health; weapon = playerWeapon.weaponEquiped; loader.SaveData(life, weapon); loader.LoadScene(nextScene); }
public void Play() { ProgressSceneLoader sceneLoader = Global.Component.GetProgressSceneLoader(); sceneLoader.LoadScene(SceneManager.GetActiveScene().buildIndex + 1); }
private void Start() { PLAYER_SPEED = new DebugCommand("player_speed", "change player speed", "player_speed <float>", (arg) => { GameObject player = Global.Obj.GetPlayerGameObject(); player.GetComponent <PlayerMovement>().speed = float.Parse(arg, CultureInfo.InvariantCulture.NumberFormat); }); FPS = new DebugCommand("fps", "shows fps", "fsp <on/off>", (arg) => { GameObject fpsWindow = GameObject.Find("fpsWindow").gameObject; if (arg == "on") { fpsWindow.GetComponent <FPSCounter>().TurnFps(true); } else if (arg == "off") { fpsWindow.GetComponent <FPSCounter>().TurnFps(false); } }); SCENE_LOAD = new DebugCommand("scene", "change scene", "scene <int>", (arg) => { ProgressSceneLoader sceneLoader = Global.Component.GetProgressSceneLoader(); sceneLoader.LoadScene(int.Parse(arg)); }); MOTION_BLUR = new DebugCommand("motion_blur", "change scene", "motion_blur <on/off>", (arg) => { Volume volume = GameObject.Find("Global Volume").GetComponent <Volume>(); MotionBlur motionBlur = null; volume.profile.TryGet(out motionBlur); if (arg == "on") { motionBlur.active = true; } else if (arg == "off") { motionBlur.active = false; } }); MOTION_BLUR_INTENCITY = new DebugCommand("motion_blur_intensity", "motion blure intencity", "motion_blur_intensity <int>", (arg) => { Volume volume = GameObject.Find("Global Volume").GetComponent <Volume>(); MotionBlur motionBlur = null; volume.profile.TryGet(out motionBlur); motionBlur.intensity.value = float.Parse(arg, CultureInfo.InvariantCulture.NumberFormat); }); MOTION_BLUR_CLAMP = new DebugCommand("motion_blur_clamp", "motion blure clamp", "motion_blur_clamp <int>", (arg) => { Volume volume = GameObject.Find("Global Volume").GetComponent <Volume>(); MotionBlur motionBlur = null; volume.profile.TryGet(out motionBlur); motionBlur.clamp.value = float.Parse(arg, CultureInfo.InvariantCulture.NumberFormat); });; commandList = new List <object> { PLAYER_SPEED, FPS, SCENE_LOAD, MOTION_BLUR, MOTION_BLUR_INTENCITY, MOTION_BLUR_CLAMP }; }