Exemplo n.º 1
0
 private void RecycleSceneLogicInfo(SceneLogicInfo logicInfo)
 {
     if (null != logicInfo && m_UnusedSceneLogicInfos.Count < m_SceneLogicInfoPoolSize)
     {
         logicInfo.Reset();
         m_UnusedSceneLogicInfos.Enqueue(logicInfo);
     }
 }
Exemplo n.º 2
0
        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);
        }