IEnumerator Feed() { _feeding = true; _body.Play("feed"); float time = 2f; while (time > 0f) { time -= Time.deltaTime; yield return(1); } _feeding = false; _feedingSkin = null; _manager.SpawnChild(_t.position); StartCoroutine(MoveToSwarm()); }
IEnumerator Feed() { _feeding = true; _body.Play("feed"); float time = 2f; while (time > 0f) { time -= Time.deltaTime; yield return(1); } _feeding = false; _feedingSkin = null; _manager.SpawnChild(_t.position); StartCoroutine(MoveToSwarm()); }