public virtual UseableEntity[] SpawnResultsAndReturnLocalOnes() { List <UseableEntity> local = new List <UseableEntity>(); List <UseableEntity> dock = new List <UseableEntity>(); foreach (var item in Data.output) { if (UnityEngine.Random.value <= item.probability) { for (int i = 0; i < (item.baseAmount + item.amountPerInput * inputEntities.Count); i++) { UseableEntity newUseableEntity = new UseableEntity(item.entity); if (item.outputToDock) { dock.Add(newUseableEntity); } else { local.Add(newUseableEntity); } } } } Game.ResultSpawnHandler.Spawn(dock.ToArray(), processor.transform); return(local.ToArray()); }
IEnumerator TestRoutine() { yield return(new WaitForEndOfFrame()); Game.ResultSpawnHandler.Spawn(UseableEntity.CreateArrayFromDataArray(spawnOnStart), transform); }