protected HarvestHuman _GetHuman() { var probs = new Dictionary <HumanInfo, float>(); for (int i = 0; i < _infoesArr.Length; ++i) { probs.Add(_infoesArr[i], _infoesArr[i].prob); } var info = DORandom.AbsProb(probs); if (!info.factory.isInit) { info.factory.Initialize(); } var human = info.factory.Allocate().GetComponent <HarvestHuman>(); human.info = info; human.generator = this; return(human); }