コード例 #1
0
ファイル: AudioSFx.cs プロジェクト: jakeingit/GGJ2015
 void Awake()
 {
     Debug.Log ("AudioSFX - Awake() - " + gameObject.name);
     if(_instance == null) {
         _instance = this;
     } else {
         Debug.Log ("Destroying self Instance: " + gameObject.name);
         Destroy (this);
     }
 }
コード例 #2
0
ファイル: AudioSFx.cs プロジェクト: jakeingit/GGJ2015
 void OnDestroy()
 {
     if(_instance == this) {
         _instance = null;
     }
 }