// Start is called before the first frame update void Start() { MBS = GetComponent<MiniBossScript01>(); if (LowHealthEscape && PlayerPrefs.GetInt(gameObject.name) == 0) { Obstacle.SetActive(true); ReplaceObstacle.SetActive(false); } Anim = GetComponent<Animator>(); myAgent = GetComponent<NavMeshAgent>(); }
IEnumerator DestroyCor() { DestroyOnce = true; ParticleSystem.GetComponent<ParticleSystem>().Play(); yield return new WaitForSeconds(0.2f); Obstacle.SetActive(false); ReplaceObstacle.SetActive(true); yield return new WaitForSeconds(0.5f); //MBS.DisableHealthBar(); //Camera.main.GetComponentInParent<TopDownCamScript>().target = Player.transform; yield return new WaitForSeconds(0.5f); Destroy(gameObject); }