public override void Update(GameTime gameTime) { if (paths == null) { paths = PathTree.makeEmptyRoot(); foreach (string key in ResearchTable.category.Keys) { paths.addChildren(PathTree.makePathTree("", key)); } hasChanged = true; } if (hasChanged) { buildPathList(); } Recalculate(); base.Update(gameTime); }