Exemple #1
0
    //public delegate void NotifyEvent();
    //public static event NotifyEvent OnMelodyComplete;

    private void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else
        {
            Destroy(gameObject);
        }
    }
Exemple #2
0
 // Start is called before the first frame update
 void Start()
 {
     instance         = this;
     playerInstrument = GetComponent <AudioSource>();
 }