LeaveWorld() public method

public LeaveWorld ( Entity entity ) : void
entity Entity
return void
Ejemplo n.º 1
0
        public bool RemovePortal(int worldId)
        {
            if (_world == null)
            {
                return(false);
            }

            using (TimedLock.Lock(_worldLock))
            {
                if (!_portals.ContainsKey(worldId))
                {
                    return(false);
                }

                var portal = _portals[worldId];
                _world.LeaveWorld(portal);
                _portals.Remove(worldId);
                return(true);
            }
        }
Ejemplo n.º 2
0
        public bool RemovePortal(int worldId)
        {
            if (_world == null)
            {
                return(false);
            }

            using (TimedLock.Lock(_worldLock))
            {
                if (!_portals.ContainsKey(worldId))
                {
                    return(false);
                }

                var portal = _portals[worldId];
                _world.LeaveWorld(portal);
                _portals.Remove(worldId);
                Log.InfoFormat("Portal {0}({1}) removed.",
                               portal.WorldInstance.Id,
                               portal.WorldInstance.Name);
                return(true);
            }
        }