public UIWall Pop() { UIWall uiWall = null; if (inactiveWalls.Count == 0) { uiWall = new UIWall(); } else { uiWall = inactiveWalls.Pop(); } activeWalls.Add(uiWall); return(uiWall); }
public void Push(UIWall uiWall) { activeWalls.Remove(uiWall); inactiveWalls.Push(uiWall); }