-1

Im trying to make a space invader style game in visual studios xna, and after creating the basic game i have attempted to input a menu screen. In order to do this is have moved around alot of my code and put the bulk of it under case State.Playing: . The rest of it is fine but 'case' is coming up with the above error message and im simply stumped. Where should i be looking?

//UPDATING PLAYING STATE 
switch (gameState)
{
    ***case*** State.Playing: 
    {
        // TODO: Add your update logic here
        int rightside = GraphicsDevice.Viewport.Width;
        int leftside = 0; 

         //moving all of the aliens 
         for (int r = 0; r < rows; r++)
         for (int c = 0; c < collumes; c++)
    {
Rob
  • 26,989
  • 16
  • 82
  • 98

1 Answers1

0

I assume you're missing some breaks at the end of your cases. Use something like this:

switch (gameState)
{
    case State.Playing:
        {
            // your code
            break;
        }
    case State.WhatEver:
        {
            // your code
            break;
        }
}
diiN__________
  • 7,393
  • 6
  • 42
  • 69