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); }
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); }
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); }
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); }