Exemplo n.º 1
0
        private void RemoveEntity(Entity entity)
        {
            //ListStreaming
            //serverReport.Entities.Remove(entity);
            entity.OnDestroy();

            if (entity is Physical phys)
            {
                Physicals.Remove(phys);
            }
            else if (entity is Projectile proj)
            {
                Projectiles.Remove(proj);
            }
            else
            {
                throw new ArgumentException();
            }

            OutgoingPool.GetHandleByObject(entity).State = SyncHandle.SyncState.Deleted;
        }
Exemplo n.º 2
0
 public void RemoveEntity(Entity entity)
 {
     Entities.Remove(entity);
     WorldContent.GetHandleByObject(entity).State = SyncHandle.SyncState.Deleted;
 }