Exemplo n.º 1
0
    void Start()
    {
        SoundRandom random = GetComponent <SoundRandom>();

        if (random != null && !random.IsInitialized)
        {
            random.Initialize();
        }

        audioSource = GetComponent <AudioSource>();
        audioSource.Play();

        DG.Tweening.DOVirtual.DelayedCall(audioSource.clip.length, Destroy);
    }
Exemplo n.º 2
0
 private void Start()
 {
     instance = instance ?? this;
 }
Exemplo n.º 3
0
 private void Awake()
 {
     instance = instance ?? this;
 }