c# - Control cannot fall through from one case label ('case 1:') to another -


this question has answer here:

im trying make space invader style game in visual studios xna, , after creating basic game have attempted input menu screen. in order have moved around alot of code , put bulk of under case state.playing: . rest of fine 'case' coming above error message , im stumped. should looking?

//updating playing state  switch (gamestate) {     ***case*** state.playing:      {         // todo: add update logic here         int rightside = graphicsdevice.viewport.width;         int leftside = 0;            //moving of aliens           (int r = 0; r < rows; r++)          (int c = 0; c < collumes; c++)     { 

i assume you're missing breaks @ end of cases. use this:

switch (gamestate) {     case state.playing:         {             // code             break;         }     case state.whatever:         {             // code             break;         } } 

Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -