Hi
would like to code a game using composition in XNA. I have 4 characters for my game namely Monster , Dog, Person and the user controlled sprite namely snake. The Monster, Dog and Person have 3 states namely: Running State, walking state and dying state. For each state there is a sprite sheet for each character repectfully.
My problem is how make use composition (inheritance/polymorphism) to accommodate for this.
Scenario: If the snake sprite collides with either of the 3 sprites, the sprite's (Moster, Dog or Person) state should change to a running state and the running sprite sheet should be drawn at the exact position of the previous sprite (walking state), Flipped-Horizontally and move in the opposite direction with respect to the previous sprite(walking state)..... The same applys for the dying state.
Can anyone pls help I have been stuck for more than a day now!
Thank in Advance.
Novy