public virtual void Spawn(Vector3 target) { Capacity--; _command.Spawn( Vector3.Lerp(_leftBorder.position, _rightBorder.position, Random.value), target, _currentLevel ); }
protected void SpawnOthers(Vector3 position) { HashSet <int> positions = new HashSet <int>(); int splitCount = Random.Range(2, Mathf.Max(2, _level - 1)); while (positions.Count < splitCount) { positions.Add(Random.Range(0, _targets.Length)); } foreach (var index in positions) { _spawnOthersCommand.Spawn(position, _targets[index], _level); } }
public void Spawn(Vector3 target) { Capacity--; _command.Spawn(transform.position, target, _level); }