Ejemplo 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);
    }
Ejemplo n.º 2
0
 private void Start()
 {
     instance = instance ?? this;
 }
Ejemplo n.º 3
0
 private void Awake()
 {
     instance = instance ?? this;
 }