AdamsLair/duality — pull request #143 by darthnihil (2014-12-01 21:58:32+00:00)
Title: Simplify If Statement GameObject Parent & Remove Middleman

Change 0/4: Use of a static class for constants

Since every resource class has a file extension that is hard coded as an attribute, the goal is to use them as global variables grouped into a single static class. Hence, it is easier to make modifications to these variables from a single static class instead of going into each class to change it.

Change 0/1: Refactor If Statement Conditions for GameObject Parent

Instead of having comments to explain what the piece of code inside the if statement does, the block was extracted into a method with a specific name which allows a better comprehension of the actions performed.

Change 0/7: Remove Middleman

Since the scene is hiding internal details (Game Objects) to the rest of the world, a lot of methods are delated to the GameObjectManager class. Our solution is to remove the middleman (GameObjectManager). The scene will be able to manipulate its own list of GameObjects without having to go through the GameObjectManager. A new interface will also be implemented in order to manage GameObjects if there is any other class that needs it.