Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2011
    Posts
    1

    Space Fighter Score System Help

    High Im new to c# and programming. I have been going through the XNA 101 bundle and went through the Space fighter section. Now that I have finished it, I have wanted to keep adding to it, except I got stuck when trying to implement a score system in it. I can't figure out how to make it work so that when an enemy dies weather shot or crashed by the player, the score is incremented by the amount of points of that certain enemy.

    I went in to GameNode class and made a variable for score so that all other children have acess to it. I than made an variable for player ship so that I can track it when it changed and before it changed. I can make it so that the score is added when i kill an enemy when I crash my ship with the enemy, but I can't make it work so that the score goes up when the projectile kill the enemy since they got their own override method of collide.

    Any help would be helpful.

  2. #2
    Join Date
    Jan 2007
    Posts
    216
    if you override a function you can still call the original function of the one you overrode. You just have to have some checks in place so nothing breaks.

  3. #3
    Join Date
    Oct 2003
    Location
    Kissimmee, Fl
    Posts
    497
    If you put up the class code I could give it a look (for what ever that's worth!)

    -Dak

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •