public void OnHole() { this.OnDead(); int num = Random.Range(1, 3); for (int i = 0; i < num; ++i) { var blood = HarvestBloodFactory.i.GetBlood(); blood.Fly( this.transform.position, DORandom.GetRandomVector3( _bloodSpeed.min, _bloodSpeed.max)); } }
protected Vector3 _GetDirection() { var dir = DORandom.GetRandomVector3(0.1f, 1.0f); if (DORandom.Chance(0.5f)) { dir.x *= -1.0f; } if (DORandom.Chance(0.5f)) { dir.y *= -1.0f; } return(DOMath.AdaptVectorToPower(dir, 1.0f)); }
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); }
protected Vector3 _GetSpeed() { return(DORandom.GetRandomVector3(_minSpeed, _maxSpeed)); }