Beispiel #1
0
        public void Spawn()
        {
            float   theta  = Random.Range(0f, Mathf.PI * 2f);
            float   phi    = Random.Range(0f, Mathf.PI * 2f);
            Vector3 offset = SphericalPoint(this.Radius, theta, phi);

            SpawnTools.Spawn(this.Spawnable, this.transform.position + offset, this.Parent);
        }
Beispiel #2
0
        private void SpawnRow(Vector3 offset)
        {
            for (float x = 0f; x <= Size.x; x += Spacing.x)
            {
                var position = transform.position + offset;
                position.x += x;

                SpawnTools.Spawn(this.Spawnable, position, this.Parent);
            }
        }