public override BaseQuestAction Clone() { QuestActionSpawnEntitySDX questActionSpawnEntity = new QuestActionSpawnEntitySDX(); base.CopyValues(questActionSpawnEntity); questActionSpawnEntity.entityIDs.AddRange(this.entityIDs); return(questActionSpawnEntity); }
private IEnumerator SpawnEntities() { for (int i = 0; i < this.count; i++) { yield return(new WaitForSeconds(0.5f)); int spawnKey = this.entityIDs[UnityEngine.Random.Range(0, this.entityIDs.Count)]; if (SingletonMonoBehaviour <ConnectionManager> .Instance.IsServer) { QuestActionSpawnEntitySDX.SpawnQuestEntity(spawnKey, OwnerQuest.SharedOwnerID, null); } else { SingletonMonoBehaviour <ConnectionManager> .Instance.SendToServer(NetPackageManager.GetPackage <NetPackageQuestEntitySpawn>().Setup(spawnKey, -1), false); } } yield break; }