Drawing an animation over an already drawn screen

Posted by Chandan Pednekar on Game Development See other posts from Game Development or by Chandan Pednekar
Published on 2012-10-22T14:56:17Z Indexed on 2012/10/22 23:19 UTC
Read the original article Hit count: 299

Filed under:
|
|
|

I am working on a XNA WP7 card game whose basic prototype is complete. In game screen, 6 cards are displayed at a time (3 for each of the two players say 1,2 and 3).

If player A attacks one of player B's card then I want to show an animation over player B's card i.e the victim card(say a claw scratch for e.g.)

My question is how do I approach with the animation system so that I can draw an animation over a card upon certain events e.g. dead, fire, claw attack etc.

I have an attack function which detects which type of card is attacking which type of card. Depending on the type of attacker card I want to display the animation on the victim card.

Can I call animation classes function for different animations in the attack function itself without actually having to call separate draw and update functions. If so, how?

Also how do I play sound at the same time when the animation is going on?

© Game Development or respective owner

Related posts about XNA

Related posts about animation