private void processTree(GameObject treeNode) { TreeNode child = null; if (!moveVert) { float x = treeNode.getX() + deltaX; treeNode.setX(x); } else { float y = treeNode.getY() + this.deltaY; treeNode.setY(y); } if (treeNode.Child != null) { child = treeNode.Child; while (child != null) { processTree((GameObject)child); child = child.Sibling; } } }