void OnTriggerEnter2D(Collider2D collider) { OrkScript ork = collider.GetComponent <OrkScript>(); if (ork != null) { Debug.Log("ooooork"); if (Bird.lastBird.isMusicOn) { orkMusicSource.Play(); } StartCoroutine(destroyLater()); Debug.Log("ork die play"); ork.hide(); } }
void Awake() { ork = this; }