public AbsWorld AddWorld(AbsWorld world)
 {
     if (!m_Worlds.ContainsKey(world.Wid))
     {
         m_Worlds.Add(world.Wid, world);
         world.OnInit();
         return(world);
     }
     return(null);
 }
Beispiel #2
0
        public void AddServerLogic <T>(Server server) where T : IServerLogic, new()
        {
            Type t = typeof(T);

            if (!m_Logics.ContainsKey(t))
            {
                T logic = new T();
                logic.OnInit(server);
                m_Logics.Add(t, logic);
            }
        }