Пример #1
0
        public Agent Get(UUID uuid)
        {
            string name = Agent.Name(uuid);

            lock (name_to_agent)
                if (name_to_agent.ContainsKey(name))
                {
                    return(name_to_agent[name]);
                }
                else
                {
                    return(null);
                }
        }
Пример #2
0
        public Agent GetOrCreate(UUID uuid, Scene scene)
        {
            string name = Agent.Name(uuid);

            lock (name_to_agent)
                if (name_to_agent.ContainsKey(name))
                {
                    return(name_to_agent[name].session < 0 ? null : name_to_agent[name]);
                }
                else
                {
                    Agent a = Add(uuid, scene);
                    return(a);
                }
        }