public void SetupAi() { prisoner = new Prisoner(NameGenerator.GetName(), (uint)Random.Range(200, 50), 100, 100, Random.Range(0f, 4f), 0); this.transform.position = prisoner.GetPrison().transform.position; this.GetComponent <Renderer>().material.color = SkinColor.instance.GetSkinColor(prisoner.GetSkinColor()); agent = this.gameObject.AddComponent <NavMeshAgent>(); }