public object Clone() { SubstanceMixture mixture = new SubstanceMixture(_listImplementation.Count); mixture.AddRange(_listImplementation); return(mixture); }
IEnumerator WaitForGameReady() { while (ServerController.Current == null || !ServerController.Current.Ready) { yield return(new WaitForEndOfFrame()); } if (_spawnMixture.Length != 0) { ISubstanceContainer container; if (_target == null) { container = GetComponent <ISubstanceContainer>(); } else { container = _target as ISubstanceContainer; } SubstanceMixture mixture = new SubstanceMixture(_spawnMixture.Length, _temperature); mixture.AddRange(_spawnMixture); //Debug.Log("SubstanceSpawner: " + mixture); if (container != null) { container.TransferInto(mixture); } else { Debug.LogError("Target not found! Please, attach target to field or make this script a component of an ISubstanceContainer"); } } }