private IEnumerator Incubate() { float wait = 10f; yield return(new WaitForSeconds(wait)); GameObject burd = Instantiate(GameManager.Instance.burbPrefab, transform.parent); burd.name = "Burd"; burd.transform.position = transform.position; Burb b = burd.GetComponent <Burb>(); yield return(null); Destroy(this.gameObject); }
// Start is called before the first frame update void Start() { controller = GetComponent <PlayerController>(); burb = GetComponent <Burb>(); }