/
crypt
/
SnowBallRefactoring
Обзор
Документация
Войти
/
crypt
/
SnowBallRefactoring
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Assets/Scripts/music.cs
35 строк
524 B
crypt
Мой первый проект. Старт рефакторинга.
21 июл 2026, 18:23
21 июл 2026, 18:23
bef234c
Код
Авторство
О чём код?
using UnityEngine; using System.Collections; public class music : MonoBehaviour { void Start() { if (PlayerPrefs.GetInt("isMusic") == 1) gameObject.GetComponent<AudioSource>().volume = 1; else gameObject.GetComponent<AudioSource>().volume = 0; } void Update() { if (PlayerPrefs.GetInt("isMusic") == 1) gameObject.GetComponent<AudioSource>().volume = 1; else gameObject.GetComponent<AudioSource>().volume = 0; } }