public void Release() { CellPointer.Release(); List <CellPointer> active = m_active; int count = active.Count; for (int i = 0; i < count; i++) { CellPointer cellPointer = active[i]; if (null != cellPointer) { Object.Destroy(cellPointer.get_gameObject()); } } active.Clear(); if (null != m_cursor) { Object.Destroy(m_cursor.get_gameObject()); m_cursor = null; } if (m_pool != null) { m_pool.Dispose(); m_pool = null; } if (null != m_prefab) { Object.Destroy(m_prefab); m_prefab = null; } }
public void EndHighlightingPlayableCharacters() { if (!m_displayPlayableCharactersHighlights) { return; } GameObjectPool pool = m_pool; if (pool == null) { return; } List <CellPointer> active = m_active; int count = active.Count; for (int i = 0; i < count; i++) { CellPointer cellPointer = active[i]; if (!(null == cellPointer)) { pool.Release(cellPointer.get_gameObject()); } } active.Clear(); m_displayPlayableCharactersHighlights = false; if (null != m_cursor) { m_cursor.get_gameObject().SetActive(true); } }