public void Pop() { if (stack.head == null) { throw new Exception("Error: You cannot pop data that you don't have"); } else { stack.pop(); // stack.count = stack.count-1; } }
public GameObject pop() { return(gameObjectStack.pop()); }