/// <summary> /// Used to destroy objects when changing states. /// </summary> virtual public void exitState() { if (mGrid != null) { mGrid.destroy(); mGrid = null; } }