Example #1
0
    // Start is called before the first frame update
    void Awake()
    {
        if (örnek == null)
        {
            örnek = this;
        }
        else
        {
            Destroy(gameObject);
            return;
        }

        DontDestroyOnLoad(gameObject);

        foreach (Sesler s in seslerYazışık)
        {
            s.sesKaynağı      = gameObject.AddComponent <AudioSource>();
            s.sesKaynağı.clip = s.klip;

            s.sesKaynağı.volume = s.sesSeviyesi;
            s.sesKaynağı.pitch  = s.perde;
            s.sesKaynağı.loop   = s.döngü;
        }
    }
Example #2
0
 private void Start()
 {
     Instance = this;
     DontDestroyOnLoad(gameObject);
     SceneManager.LoadScene("Menu");
 }