What is the best way to increment an enumeration?
<p>Hey there guys. I was hoping someone would be able to help me figure out how to increment enumeration. I have a game that uses enumeration to get the points for killing an enemy, I want the value of the enemy to increment by 10 every time one of the enemies is killed. Here is the code I have for the enumeration:</p>

<pre><code>  public enum gamescore// Enumeration to hold the score values of the enemies

  {

  Martian = 10,

  Vesuvian = 20,

  Mercurian = 30,

  Meteor = 50,

  MotherShip = 100,

  Destroyer = 200

  }
</code></pre>

<p>and the method to get the score called from another class when an enemy dies:</p>

<pre><code>    public int GetScore()// The method that utilieses the enumeration to get the score for the enemy killed
    {

        if (this is Martian)
        {
            return (int)gamescore.Martian;
        }
        else if (this is Vesuvian)
        {
            return (int)gamescore.Vesuvian;
        }
        else if (this is Mercurian)
        {
            return (int)gamescore.Mercurian;
        }
        else if (this is Destroyer)
        {
            return (int)gamescore.Destroyer;
        }
        else if (this is Meteor)
        {
            return (int)gamescore.Meteor;
        }
        else if (this is Mothership)
        {
            return (int)gamescore.MotherShip;
        }
        return 0;
    }
</code></pre>

<p>Any suggestions? I can only come up with complicated ways to do this, that I don't think even works.</p>

<p>Also I was wondering, I have a highscore label that is updated if it is less than score, so highscore becomes score, but when the application restarts, if the game is completed or if the player runs out of lives, the highscore resets back to zero, is there any way to keep the highscore value in there so the highest score is always there?</p>

<p>I appreciate all your help with my questions guys, I really do.</p>

<p>Thanks! </p>
