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; }
public void RemoveEntity(Entity entity) { Entities.Remove(entity); WorldContent.GetHandleByObject(entity).State = SyncHandle.SyncState.Deleted; }