Ejemplo n.º 1
0
 public override void OnLoad(string name, LookingGlassBase lgbase) {
     base.OnLoad(name, lgbase);
     m_instance = this;      // there is only one world
     m_regionList = new List<RegionContextBase>();
     ModuleParams.AddDefaultParameter(m_moduleName + ".Communication", "Comm", "Communication to connect to");
 }
Ejemplo n.º 2
0
 private void World_OnEntityUpdate(IEntity ent, World.UpdateCodes what)
 {
     IEntityAvatar av = null;
     if (ent.TryGet<IEntityAvatar>(out av)) {
     m_log.Log(LogLevel.DUPDATEDETAIL|LogLevel.DVIEWDETAIL, "OnEntityUpdate: Avatar: {0}", ent.Name.Name);
     this.Renderer.RenderUpdate(ent, what);
     }
     else {
     m_log.Log(LogLevel.DUPDATEDETAIL|LogLevel.DVIEWDETAIL, "OnEntityUpdate: Other. w={0}", what);
     this.Renderer.RenderUpdate(ent, what);
     }
     return;
 }
        // IModule.AfterAllModulesLoaded
        public virtual bool AfterAllModulesLoaded()
        {
            LogManager.Log.Log(LogLevel.DINIT, "AvatarTracker.AfterAllModulesLoaded()");
            m_restHandler = new RestHandler("/avatars", GetHandler, PostHandler);

            m_world = World.Instance;   // there is only one world
            m_world.OnAgentNew += new WorldAgentNewCallback(World_OnAgentNew);
            m_world.OnAgentRemoved += new WorldAgentRemovedCallback(World_OnAgentRemoved);
            m_world.OnWorldEntityNew += new WorldEntityNewCallback(World_OnWorldEntityNew);
            m_world.OnWorldEntityUpdate += new WorldEntityUpdateCallback(World_OnWorldEntityUpdate);
            m_world.OnWorldEntityRemoved += new WorldEntityRemovedCallback(World_OnWorldEntityRemoved);
            return true;
        }