public void addPerson() { PeopleScript p = new PeopleScript(); p = Instantiate(p); p.randomizerstats(); Persons.Add(p); }
// Start is called before the first frame update void Start() { person = gameObject.GetComponent<PeopleScript>(); weapon = gameObject.GetComponent<WeaponScript>(); health = gameObject.GetComponent<PeopleScript>().curhealth + weapon.end * 15; speed = person.agility; armor = person.strength + weapon.armor; gs = GameObject.FindGameObjectsWithTag("gameManager")[0].GetComponent<GameScript>(); StartCoroutine(combatTurn()); }