Exemplo n.º 1
0
        public void ProcessNpcUpdateSync(object incomingData)
        {
            string      scenetype = EB.Dot.String("scenetype", incomingData, "");
            IDictionary npcs      = EB.Dot.Object(scenetype + ".npc_list", incomingData, null);

            if (npcs == null)
            {
                return;
            }
            SceneLogic scenelogic = MainLandLogic.GetInstance();

            if (scenelogic == null)
            {
                return;
            }
            foreach (DictionaryEntry entry in npcs)
            {
                bool            fighting = EB.Dot.Bool("busy", entry.Value, false);
                EnemyController ec       = scenelogic.GetEnemyController(entry.Key.ToString());
                if (ec != null)
                {
                    //if(!( ec is BoxController))
                    //{
                    //    ec.SetBarHudState(eHeadBarHud.FightStateHud, null, fighting);
                    //}
                }
                else
                {
                    NpcDelegate npc = null;
                    m_ManagedNpcs.TryGetValue(entry.Key.ToString(), out npc);
                    if (npc != null)
                    {
                        npc.isfighting = fighting;
                    }
                }
            }
        }