Exemple #1
0
 protected override void Awake()
 {
     base.Awake();
     DontDestroyOnLoad(this.gameObject);
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(this.gameObject);
         return;
     }
     sfxQueue = new List <SFX>();
 }
    void Start()
    {
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            //잘못된 인스턴스를 가르키고 있을 경우
            Destroy(gameObject);
        }
        DontDestroyOnLoad(this);

        myAudio = transform.Find("SFX").GetComponent <AudioSource>();
        StartCoroutine(StopSFXSound());
    }
Exemple #3
0
 public void OnDestroy()
 {
     GlobalSFX.Play(GlobalSFX.SFX.Pickup);
 }
Exemple #4
0
 public void OnDestroy()
 {
     GlobalSFX.Play(7);
 }