Added a Dungeon parameter to DungeonObject and improved movement logic