Hi there,
I’m developing a game for a project at school, and just need some help with wrapping my head around this.
Basically, its going to be a platform-arcade-fighting game (essentially super smash bros), that will allow for multiple players competing at the same time. This is how I’ve structured the class diagram (don’t mind the specific character class names, it’s what i thought of for the example):
FLA --> Game --> SlippyToad --> Player --> Movement / Attack / Damage / Stocks(lives)
FLA --> Game --> DuckHuntDog --> Player --> Movement / Attack / Damage / Stocks(lives)
FLA --> Game --> Waluigi --> Player --> Movement / Attack / Damage / Stocks(lives)
FLA --> Game --> Tails --> Player --> Movement / Attack / Damage / Stocks(lives)
(I’ll try to upload an actual image of a Visio diagram version, I’m just at work.)
What I’d like to know, is does this structure seem sound? I know using Java or C# I’d use an enum to take care of the character specific classes, but anyways.
I’ve started to begin coding this, and I can’t seem to quite get it. For example, I tried to just have a simple EventListener on the Movement class, that listens when the keyboard is hit and traces the keyCode. I thought I could have the event bubble up through the classes, but I couldn’t get it to work, because its not focused on the stage. But when I put the event listener and function in the document class, it works no problem, but structurally doesn’t seem right.
All advice is appreciated, provided its not soul-crushingly negative
Thanks again!
**EDIT:
**