示例#1
0
 private void OnDestroy()
 {
     if (SoundSistem.instance == this)
     {
         SoundSistem.instance = null;
     }
 }
示例#2
0
 private void Awake()
 {
     if (SoundSistem.instance == null)
     {
         SoundSistem.instance = this;
     }
     else if (SoundSistem.instance != this)
     {
         Destroy(gameObject);
     }
 }