private void RecycleSceneLogicInfo(SceneLogicInfo logicInfo) { if (null != logicInfo && m_UnusedSceneLogicInfos.Count < m_SceneLogicInfoPoolSize) { logicInfo.Reset(); m_UnusedSceneLogicInfos.Enqueue(logicInfo); } }
private SceneLogicInfo NewSceneLogicInfo(int id) { SceneLogicInfo info = null; if (m_UnusedSceneLogicInfos.Count > 0) { info = m_UnusedSceneLogicInfos.Dequeue(); info.Reset(); info.InitId(id); } else { info = new SceneLogicInfo(id); } return(info); }