Refactor selectedObject to global TowerDefense object.