private void RecycleSceneLogicInfo(SceneLogicInfo logicInfo) { if (null != logicInfo && m_UnusedSceneLogicInfos.Count < m_SceneLogicInfoPoolSize) { logicInfo.Reset(); m_UnusedSceneLogicInfos.Enqueue(logicInfo); } }
static public int Reset(IntPtr l) { try { GameFramework.SceneLogicInfo self = (GameFramework.SceneLogicInfo)checkSelf(l); self.Reset(); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
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); }