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 Vector3 _GetSpeed() { return(DORandom.GetRandomVector3(_minSpeed, _maxSpeed)); }