⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jmps.java

📁 一个j2me的滑雪游戏
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
		
		//--------------------------------------------------------------------------
		if( GM == 500 ){

			GF[1] = true;

			if( !GF[16] ){
				LineOY = LineY;
				LineY -= CVY;
				nScroll += 3 * CVY;
				
				if( ( Key[1] & 1048608 ) != 0 || Pow == 0 ) GF[11] = true;

				if( LineY < 0 ) LineY += 32;

				if( !GF[11] )	Pow = ( Pow + 5 ) % 55;

				if( Pow == 50 && GF[14] && !GF[11] ){
					GF[11] = true;// Tutorial (..)
					GF[16] = true;
				}

				Frame++;
				LineX = -( 100 * Frame ) / 10;
				OffJP = 3 * Frame;

				if( Frame == 11 ){
					Draw();

					Pow = ( 60 * ( 50 + Pow ) ) / 100;
					CVY = 10;

					GM = 600;
					Frame = 0;
					Kyori = 0;
					LineX = -100;
					LineY = 0;
          // RedLine = 0;
					Hikyori = 0;
					RedPoint = 0;
					GF[3] = true;
					GF[12] = false;
					GF[16] = GF[14];
					
					if( Pow == 60 ) Pow = Power[ VSList[0] ];
					return;
				}
			}
			else {				
				GF[15] = true;
				Temp[0] = ( Temp[0] + 1 ) % 15;
				if( Temp[0] == 0 ){
					HowTo++;
					GF[15] = false;
					GF[16] = false;
				}
			}
		}
		//-------------------------------------------------------------------------------------------------------------------------------------------- 懾嬻
		if( GM == 600 ){

			Frame++;			
			Hikyori++;
			GF[1] = true;
			LineOY = LineY;
			LineY -= CVY;
			if( LineY < 0 ) LineY += 32;

			GF[15] = false;
			if (GF[14] && (Frame == 11 || Frame == 12 || Frame == 22 || Frame == 23)){
				GM = 650; // Tutorial
				Temp[0] = 0;
				GF[15] = true;
				return;
			}
			else{
				Kyori += (5*Pow)/6;
				WindTime--;
				if( WindTime <= 0 )	CreateWind();

				if( Frame % 3 == 0 ){
					i = WindPow * 2;
					if( Math.abs( WindLR ) > ( Meter[ i + 5 ] / 2 ) ){
						Pow--;
					}
					if( Math.abs( WindLR ) > ( Meter[ i + 4 ] / 2 ) ){
						RedPoint++;
						Pow--;
					}
				}

				if( Frame % WindUD == 0 )	Pow--;
				
				Pow--;
				if( GF[12] ) Pow--;


				if( GF[14] && Math.abs( WindLR ) > 10 ){// How To (...)
					if(WindLR < 0) Key[0] = 262728;
          else if(WindLR > 0) Key[0] = 65682;
				}

				i = 0;

				if( ( Key[0] & 65682 ) != 0 ) i -= Math.abs( WindLRPow ) + 1;
				if( ( Key[0] & 262728 ) != 0 ) i += Math.abs( WindLRPow ) + 1;
				if( ( Key[1] & ( 524544 | 1048608 ) ) != 0 ) GF[12] = true;

        WindLR += WindLRPow + i;
				if(Math.abs(WindLR) > 32) WindLR = (32 * WindLR) / Math.abs(WindLR);

				// 拝抧Tutorial
				if( Pow <= 10 && GF[16] ){
					Frame = 0;
					GM = 650;
					GF[16] = false;
				}
				// just landed?
				if( Pow <= 0 ){
          //if (Kyori >= 1200) playsound(landgood);
          //else playsound(landbad);
					GM = 700;
					Frame = 30;
					Pow = 0;
					Temp[0] = 0;
				}
				LineX = ( -200 * Pow ) / 60;
			}

		}
		//--------------------------------------------------------------------------
		if( GM == 650 ){
//			GF[1] = true;
			GF[15] = true;

			Temp[0] = ( Temp[0] + 1 ) % 16;
			if( Temp[0] == 0 ){
				HowTo++;
				if( HowTo == 9 ) return;

				GF[12] = true;
				GF[15] = false;
				GM = 600;
				return;
			}
		}
		//--------------------------------------------------------------------------
		if( GM == 700 ){

			GF[1] = true;
			LineOY = LineY;

			Frame--;
			if( Frame > 0 ) {
				PXY = 5 * ( 30 - Frame );
				if(Frame > 19 && (Key[1] & 1048608) != 0 && (VSList[0] == 7 || VSList[0] == 6))
					GF[12] = true;

				if( Temp[0] < 6 && GF[12]) Temp[0]++;
			}
			else{
				Temp[0] = 0;
				Temp[1] = 60 + ( ( Kyori - 1200 ) * 18 ) / 100;
				
				if( Temp[1] < 0 ) Temp[1] = 0;
				Temp[0] += Temp[1];

        Hikei = 50 - ( 50 * RedPoint ) / Hikyori + Math.abs( R.nextInt() % 3 );
				if( GF[12] ) Hikei += 8;
				Temp[0] += Hikei;

				nScore[0] += Temp[0];

				Frame = 0;
				GM = 800;
        //playsound(applause);

				// End tutorial
				if (GF[14]) {
          GM = -100;          
        }
				return;
			}

		}
		//--------------------------------------------------------------------------
		if( GM == 800 ){
			GF[1] = true;
			
			if( Frame < 9 ) Frame++;

			if( ( Key[1] & ( 1048608 | 2097152 ) ) != 0 ){
				Frame = 0;
				GM = 850;
				nSel = 0;
				for( i = 0; i < 4; i++ ){
					Temp[i] = nScore[i];
					Temp[4 + i] = VSList[i];
				}

				for( i = 1; i < 4; i++ ){
					Temp[8] = Temp[i];
					Temp[9] = Temp[4 + i];

					for( j = i; j > 0; j-- ){
						if(Temp[8] < Temp[j-1])	break;
						Temp[j] = Temp[j - 1];
						Temp[4+j] = Temp[j + 3];
					}
					Temp[j] = Temp[8];
					Temp[4+j] = Temp[9];
				}

				for( i = 0; i < 4; i++ )
					if( VSList[0] == Temp[4 + i] ) break;
				Temp[10] = i;
        return;
			}
		}
		//-------------------------------------------------------------------------- ranking
		if( GM == 850 ){
			GF[1] = true;

			if( Frame < 13 ){
				Frame++;
				nSel = Frame / 3;
			}

			if( ( Key[1] & ( 1048608 | 2097152 ) ) != 0 ){
				Kaisuu++;
				Frame = 0;
				GM = 300;
				GF[11] = true;
				nSel = 0;

				if( Kaisuu == 3 ){  // lost
					Kaisuu = 1;

          if (Temp[10] == 0) GM = 888;
          else GM = 950;
				}
				else { // next stage
					FirstKyori = Kyori;
					//nScore[1] += CpuScore[3 + ( nStage - 1 ) * 6] + Math.abs( R.nextInt() % CpuScore[33 + ( nStage - 1 ) * 6] );
					//nScore[2] += CpuScore[4 + ( nStage - 1 ) * 6] + Math.abs( R.nextInt() % CpuScore[34 + ( nStage - 1 ) * 6] );
					//nScore[3] += CpuScore[5 + ( nStage - 1 ) * 6] + Math.abs( R.nextInt() % CpuScore[35 + ( nStage - 1 ) * 6] );
          // changed difficulty progression (harder first stages, same last stage)
          nScore[1] += -3 + CpuScore[3 + (nStage - 1) * 6] + Math.abs( R.nextInt() % CpuScore[33 + ( nStage - 1 ) * 6] );
					nScore[2] += -3 + CpuScore[4 + (nStage - 1) * 6] + Math.abs( R.nextInt() % CpuScore[34 + ( nStage - 1 ) * 6] );
					nScore[3] += -3 + CpuScore[5 + (nStage - 1) * 6] + Math.abs( R.nextInt() % CpuScore[35 + ( nStage - 1 ) * 6] );
				}
				GF[11] = true;				
				Temp[0] = -20;
				Temp[1] = 15;

				return;
			}
		}
		//-------------------------------------------------------------------------- applause
		if( GM == 888 ){

			GF[1] = true;
			if( Frame < 35 && !( ( Key[1] & ( 1048608 | 2097152 ) ) != 0 ) ){
				Frame++;				
				Temp[0] += 2;
				Temp[1] += 1;
			}
			else{
				Frame = 0;
				GM = 900;
				return;
			}
		}
		//-------------------------------------------------------------------------- win cup
		if (GM == 900) {
			GF[1] = true;

			if( ( Key[1] & ( 1048608 | 2097152 ) ) != 0 ){
				nStage++;
        updateScores();

				GM = 200;
				Frame = 0;
				if( nStage > 5 ){
          saveScores();
					GM = 998;
					nStage = 0;
					fClear = 1;
				}
        else {
					GF[11] = true;
				}
				return;
			}
		}
		//-------------------------------------------------------------------------- continue?
		if (GM == 950) {
			GF[1] = true;

			if (( Key[1] & (524544 | 131076) ) != 0)  nSel = (nSel+1) % 2;
			if (( Key[1] & 1048608) != 0) {
				GF[11] = true;
				GM = 200 * (1 - nSel);
				Frame = 0;
        updateScores();
        if (nSel == 0) {   // continue = yes
          totalScore = 0;
        }
        else {
          saveScores();
          gameOver();     // continue = no
        }
        nScore[0] = 0;
				nSel = 0;
				return;
			}
		}
		//--------------------------------------------------------------------------
		if (GM == 998) {
			GF[1] = true;
			Frame++;
			if(Frame > 10){
				Frame = 0;
				GM = 999;
				return;
			}
			PXY = ( 40 * ( 10 - Frame ) ) / 10;
		}
		//--------------------------------------------------------------------------
		if( GM == 999 ){
			if(Frame < 9)	Frame++;
			nSel = Frame / 3;
			GF[1] = true;			
			if( ( Key[1] & ( 1048608 | 2097152 ) ) != 0 ){
				nSel = 0;
				Temp[1] = 0;
				Frame = 0;
				GM = 1200;
				return;
			}
		}	
		//--------------------------------------------------------------------------
		if( GM == 1200 ){

      gameOver();
      if(true) return;

			if( ( Key[1] & ( 1048608 | 2097152 ) ) != 0 ){
				GM = 0;
				return;
			}

			if( Frame < 1800 ) {
				Frame++;
				if( Frame % 10 == 0 ) Temp[1] = 0;
			}

			Temp[0] = Frame / 10;

      // Thanks for your playing. You are greatest player!

			if( Temp[0] == 0 || Temp[0] == 4 ){
				Temp[1]++;
				Temp[2] = 255 - ( 255 * Temp[1] ) / 10;
				Temp[3] = ( 255 * Temp[1] ) / 10;
			}
			if( Temp[0] == 1 || Temp[0] == 3 ){
				Temp[2] = 0;
				Temp[3] = 0;
			}
			if( Temp[0] == 2 ){
				Temp[1]++;
				Temp[2] = ( 255 * Temp[1] ) / 10;
				Temp[3] = 255 - ( 255 * Temp[1] ) / 10;
			}

      // Winter Sports Series

			if( Temp[0] == 5 ){
				Temp[1]++;
				Temp[2] = 255 - ( 255 * Temp[1] ) / 10;
				Temp[3] = 255;
				Temp[4] = 255;
			}
			if( Temp[0] == 6 ){
				Temp[1]++;
				Temp[2] = 0;
				Temp[3] = 255 - ( 255 * Temp[1] ) / 10;
			}
			if( Temp[0] == 7 ){
				Temp[1]++;
				Temp[3] = 0;
				Temp[4] = 255 - ( 255 * Temp[1] ) / 10;
			}
			if( Temp[0] == 8 ){
				Temp[1]++;
				Temp[4] = 0;
			}
			if( Temp[0] == 9 ){
				Temp[1]++;
				Temp[2] = ( 255 * Temp[1] ) / 10;
				Temp[3] = Temp[2];
				Temp[4] = Temp[3];
			}

      // CURLING SPEED SKATING and... SKI-JUMP

      if( Temp[0] == 10 ){
				Temp[1]++;
				Temp[2] = 255 - ( 255 * Temp[1] ) / 10;
				Temp[3] = 255;
				Temp[4] = 255;
				Temp[5] = 255;
			}
			if( Temp[0] == 11 ){
				Temp[1]++;
				Temp[2] = 0;
				Temp[3] = 255 - ( 255 * Temp[1] ) / 10;
			}
			if( Temp[0] == 12 ){
				Temp[1]++;
				Temp[3] = 0;
				Temp[4] = 255 - ( 255 * Temp[1] ) / 10;
			}
			if( Temp[0] == 13 ){
				Temp[1]++;
				Temp[4] = 0;
				Temp[5] = 255 - ( 255 * Temp[1] ) / 10;
			}

      // (C)HUDSON SOFT Created BY 卑偬

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -