Esempio n. 1
0
        protected override void OnUpdate()
        {
            var entity   = GetSingletonEntity <SpawnGameArray>();
            var requests = EntityManager.GetBuffer <SpawnGameRequest>(entity);

            if (requests.Length == 0)
            {
                return;
            }

            var array = requests.ToNativeArray(Allocator.Temp);

            requests.Clear();

            foreach (var spawnGame in array)
            {
                GameCreateUtilities.CreateGame(EntityManager);
            }

            array.Dispose();
        }
Esempio n. 2
0
 public override Entity Create(EntityManager entityManager, BundledResourceManager resourceManager,
                               GameWorld world, ushort type)
 {
     return(GameCreateUtilities.CreateGame(entityManager));
 }