LoadData() public method

public LoadData ( TableConfig cfg ) : void
cfg TableConfig
return void
Example #1
0
        public EntityInfo DelayAddEntity(int id, int unitId, int camp, TableConfig.Actor cfg, string ai, params string[] aiParams)
        {
            EntityInfo entity = NewEntityInfo(id);

            entity.SceneContext = m_SceneContext;
            entity.LoadData(unitId, camp, cfg, ai, aiParams);
            entity.IsBorning = true;
            entity.BornTime  = 0;
            entity.SetAIEnable(false);
            m_DelayAdd.Add(entity);
            return(entity);
        }
Example #2
0
        public EntityInfo DelayAddEntity(int id, int unitId, int camp, TableConfig.Actor cfg, int ai, params string[] aiParams)
        {
            EntityInfo entity = NewEntityInfo(id);

            entity.SceneContext = m_SceneContext;
            entity.LoadData(unitId, camp, cfg, ai, aiParams);
            entity.IsBorning = true;
            entity.BornTime  = 0;
            entity.SetAIEnable(false);
            entity.SetStateFlag(Operate_Type.OT_AddBit, CharacterState_Type.CST_Invincible);
            m_DelayAdd.Add(entity);
            return(entity);
        }
Example #3
0
        public EntityInfo AddEntity(int unitId, int camp, TableConfig.Actor cfg, string ai, params string[] aiParams)
        {
            EntityInfo entity = NewEntityInfo();

            entity.SceneContext = m_SceneContext;
            entity.LoadData(unitId, camp, cfg, ai, aiParams);
            // born
            entity.IsBorning = true;
            entity.BornTime  = 0;
            entity.SetAIEnable(false);
            m_Entities.AddLast(entity.GetId(), entity);
            return(entity);
        }
Example #4
0
        public EntityInfo AddEntity(int id, int unitId, int camp, TableConfig.Actor cfg, string ai, params string[] aiParams)
        {
            if (m_Entities.Contains(id))
            {
                LogSystem.Warn("duplicate entity {0} !!!", id);
                return(null);
            }
            EntityInfo entity = NewEntityInfo(id);

            entity.SceneContext = m_SceneContext;
            entity.LoadData(unitId, camp, cfg, ai, aiParams);
            entity.IsBorning = true;
            entity.BornTime  = 0;
            entity.SetAIEnable(false);
            m_Entities.AddLast(entity.GetId(), entity);
            return(entity);
        }