Exemplo n.º 1
0
 private void OnEntitySpawned(EntityID spawned)
 {
     if (_entities.Contains(spawned))
     {
         Debug.LogError("Duplicate entity id " + spawned.ObjectID, spawned.gameObject);
     }
     else
     {
         _entities.Add(spawned);
     }
 }
Exemplo n.º 2
0
        public GameObject GetObject(long id)
        {
            EntityID entity = _entities.Find(ent => ent.ObjectID == id);

            if (entity != null)
            {
                return(entity.gameObject);
            }

            Debug.LogErrorFormat("Entity with ID {0} not found", id);
            return(null);
        }
Exemplo n.º 3
0
 public bool HasObject(EntityID objectID)
 {
     return(_entities.Contains(objectID));
 }