At 10/21/13 01:35 PM, Rustygames wrote:
I would like to see some of your source code metal gear solid bamboo, just because I'm nosey :D
My doc class has public references to a bunch of manager classes which handle a certain aspect of the game (Item, Inventory, Fade, Quest, Assets). They all have a reference to the main class, so they have access to other manager's methods. None of them have common methods; the methods are literally what I need that class to do (inv.getItems, party.addMember), so in that regard it's a bit messy. I would have gone the extra effort to make them singletons, but I didn't feel like it.
just don't be an idiot by setting the reference to something else, that's my logic
The ChildManager uses overridden addChild to display things backwards. The fade layer should always be on top, even through states getting added and removed, and the dialogue layer under the fade, etc.
StateManager holds the current state and updates/renders that. The states implement an interface. Some states can be "suspended" rather than replaced if I don't want to completely exit it (the overworld persists when you open the menu rather than being replaced by it). Blah, blah, blah
It was all inspired by P telling me to group aspects of the game into a class that manages it.
I made something for handling queueing of animations, tweens, delays and function calls in Flash. You can have it if you want?
I'm comfortable with what I have now, but you can post it if you want.