Exemplo n.º 1
0
 public void SubLevelEvent(object obj, EventArgs e)
 {
     if ((double)obj == Game1.LEVEL_SCREEN)
     {
         mCurrentScreen = mLevelScreen;
     }
     else if((double)obj == Game1.LEVEL11)
     {
         PlayScreen.SUB_LEVEL = Game1.LEVEL11;
         mPlayScrren = new PlayScreen(this.Content, this.GraphicsDevice, new EventHandler(PlayScreenEvent));
         mCurrentScreen = mPlayScrren;
     }
     else if((double)obj == Game1.LEVEL12)
     {
         PlayScreen.SUB_LEVEL = Game1.LEVEL12;
         mPlayScrren = new PlayScreen(this.Content, this.GraphicsDevice, new EventHandler(PlayScreenEvent));
         mCurrentScreen = mPlayScrren;
     }
     else if((double)obj == Game1.LEVEL21)
     {
         PlayScreen.SUB_LEVEL = Game1.LEVEL21;
         mPlayScrren = new PlayScreen(this.Content, this.GraphicsDevice, new EventHandler(PlayScreenEvent));
         mCurrentScreen = mPlayScrren;
     }
     else if ((double)obj == Game1.LEVEL22)
     {
         PlayScreen.SUB_LEVEL = Game1.LEVEL22;
         mPlayScrren = new PlayScreen(this.Content, this.GraphicsDevice, new EventHandler(PlayScreenEvent));
         mCurrentScreen = mPlayScrren;
     }
     else
     {
         mCurrentScreen = mSubLevelScreen;
     }
 }
Exemplo n.º 2
0
 public void LevelScreenEvent(object obj, EventArgs e)
 {
     if ((double)obj == Game1.HOME)
     {
         mCurrentScreen = mHomeScreen;
     }
     else if ((double)obj == Game1.LEVEL1)
     {
         SubLevelScreen.LEVEL = Game1.LEVEL1;
         mSubLevelScreen = new SubLevelScreen(this.Content, this.GraphicsDevice, new EventHandler(SubLevelEvent));
         mCurrentScreen = mSubLevelScreen;
     }
     else if ((double)obj == Game1.LEVEL2)
     {
         SubLevelScreen.LEVEL = Game1.LEVEL2;
         mSubLevelScreen = new SubLevelScreen(this.Content, this.GraphicsDevice, new EventHandler(SubLevelEvent));
         mCurrentScreen = mSubLevelScreen;
     }
     else if ((double)obj == Game1.LEVEL3)
     {
         PlayScreen.SUB_LEVEL = Game1.LEVEL3;
         mPlayScrren = new PlayScreen(this.Content, this.GraphicsDevice, new EventHandler(PlayScreenEvent));
         mCurrentScreen = mPlayScrren;
     }
 }