void Spawn() { enemy_control recruit = Instantiate(enemy, transform.position, transform.rotation).GetComponent <enemy_control>(); recruit.previous = gameObject.transform; recruit.destination = nextNode.transform; }
// Start is called before the first frame update void Start() { GameObject manager = GameObject.Find("enemy_manager"); control = manager.GetComponent <enemy_control>(); anim = GetComponent <Animator>(); }