Пример #1
0
		public override void tick(InputHandler input) {
			// Transicion vertical
			if (graphics.Screen.Height - (bg.Position.Y + bg.Height) <= 0) {
				ybg = (int)(ybg + 2);
				if (input.fire.clicked) {
					//ybg = (int)(graphics.Screen.Height - bg.Height - 2);
					bg.Position.Y = graphics.Screen.Height - bg.Height - 2;
				}
			}
			else {
				if(input.up.clicked)
					selected--;
				if(input.down.clicked)
					selected++;
				
				int len = options.Length;
				if (selected < 0)
					selected += len;
				if (selected >= len)
					selected -= len;
	
				if (input.fire.clicked) {

					if (selected == 0) {
						sound.close();
						//MP3Player.title.stop();
						AppMain.startLevel(1, 5);
						//AppMain.setMenu(new LevelMenu(1, graphics, scale));
					}
					if (selected == 1) {
						sound.close();
						//MP3Player.title.stop();
						AppMain.setMenu(new CreditsMenu(graphics, scales));
					}
					if (selected == 2) {
						AppMain.setMenu(new SetupMenu(this, graphics, scales));
					}
					if (selected == 3) {
						AppMain.setMenu(new PasswordMenu(this, graphics, scales));
					}
				}
	
			}
		}
Пример #2
0
 public override void tick(InputHandler input)
 {
     if (this.clock.ElapsedMilliseconds > 3 * 1000 || input.fire.clicked)            // 3 segundos
     {
         this.clock.Stop();
         AppMain.setMenu(null);
         sound.close();
         //MP3Player.map_start.stop();
     }
 }
Пример #3
0
        public override void tick(InputHandler input)
        {
            if (input.exit.clicked || (music != null && !music.isPlaying()))
            {
                music.close();
                AppMain.setMenu(new TitleMenu(graphics, scales));
            }

            if (graphics.Screen.Height + y + (credits.Length - 1) * font.getTilesize() * 2 * scales.Y > graphics.Screen.Height / 2)
            {
                y -= 0.5f;
            }
        }