亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? worldcanvas.java

?? MIDP1.0的橫板游戲源碼
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
				while(ptr!=null){
//					判斷下
					if((ptr.x-ptr.width/2)<cre.x-1&&cre.x-1<(ptr.x+ptr.width/2)||(ptr.x-ptr.width/2)<cre.x+1&&cre.x+1<(ptr.x+ptr.width/2)){
						y=ptr.y-ptr.height;
						if(cre.y>=y&&cre.y<=ptr.y){
							cre.y=y;
							GroundTouch=true;
							if(!cre.ifOnGround()){
								cre.OnGround();
								cre.stopFall();
								cre.stopMove();
							}
						}
					}
					int gty=ptr.y-ptr.height;
					int gby=ptr.y;
					int cty=cre.y-cre.height;
					int cby=cre.y;
					if((cty<gty&&gty<cby)||(cty<gby&&gby<cby)||(gty<cby&&cby<gby)||(gty<cty&&cty<gby)){
						//判斷左
						if((cre.x-cre.width/2)<ptr.x+ptr.width/2&&cre.x>ptr.x){
							cre.x=ptr.x+ptr.width/2+cre.width/2;
							leftTouch=true;
						}
						//判斷右
						if((cre.x+cre.width/2)>ptr.x-ptr.width/2&&cre.x<ptr.x){
							cre.x=ptr.x-ptr.width/2-cre.width/2;
							rightTouch=true;
						}
					}
					ptr=ptr.next;
				}
			}
		}
		if(!GroundTouch){
			cre.LeaveGround();
			cre.increaseFallSpeed(50);
		}
		if(leftTouch){
			cre.CantLeft();
		}
		else{
			cre.CanLeft();
		}
		if(rightTouch){
			cre.CantRight();
		}
		else{
			cre.CanRight();
		}
		if(cre.y>220){
			cre.hp=0;
		}
	}
	protected void drawSpaceGround(int num){
		Ground ptr=null;
		ptr=Grounds[num];
		while(ptr!=null){
			if(ptr.mapid!=0){
				drawgame(ptr.mapid,ptr.x,ptr.y);
				//TODO test
				//
				//
				//
				GIB.setClip(0,0,176,208);
				GIB.setColor(0,0,255);
				GIB.drawRect(ptr.x-ptr.width/2-screenx+1,ptr.y-ptr.height,ptr.width,ptr.height);
			}
			ptr=ptr.next;
		}
	}
	protected void drawSpaceCreature(int num){
		Creature ptr=null;
		ptr=Creatures[num];
		while(ptr!=null){
			if(ptr.mapid!=0){
				drawgame(ptr.getMapID(),ptr.x,ptr.y);
//				TODO test
				//
				//
				//
				GIB.setClip(0,0,176,208);
				GIB.setColor(0,0,255);
				GIB.drawRect(ptr.x-ptr.width/2-screenx+1,ptr.y-ptr.height,ptr.width,ptr.height);
			}
			ptr=ptr.next;
		}
	}
	//TODO LoadMap
	protected void LoadMap(){
		switch(Level){
		case 0:
			LoadMap("map0");
			break;
		case 1:
			LoadMap("map1");
			break;
		case 2:
			LoadMap("map2");
			break;
		}
	}

	protected Ground findGround(Ground gtemp[],int type){
		if(gtemp!=null){
			for(int i=0;i<gtemp.length;++i){
				if(gtemp[i].type==type){
					return gtemp[i];
				}
			}
			return gtemp[0];
		}
		else{
			System.out.println("none");
			return null;
		}
	}
	protected Creature findCreature(Creature gtemp[],int type){
		if(gtemp!=null){
			for(int i=0;i<gtemp.length;++i){
				if(gtemp[i].type==type){
					return gtemp[i];
				}
			}
			return gtemp[0];
		}
		else{
			return gtemp[0];
		}
	}
	protected Ground groundtemp[];
	protected Creature creaturetemp[];
	protected byte Btemp[];
	protected byte Ctemp[];
	protected byte map[];
	protected int i_load;
	protected void LoadMap(String name){
		Btemp=readFile(objectpath,"ground");
		LoadGroundObjInfo(Btemp);
		Ctemp=readFile(objectpath,"creature");
		LoadCreaturObjInfo(Ctemp);
		Btemp=null;
		Ctemp=null;
		i_load=0;
		map=readFile(mappath,name);
		LoadBackGround();
		LoadGround();
		LoadCreature();
		map=null;
	}
	protected void LoadBackGround(){
		CharOP.clear();
		char cha=0;
		boolean key=true;
		while(key){
			cha=CharOP.readUnicode(map[i_load],map[i_load+1]);
			if(cha=='['){
				CharOP.record(cha);
				while(true){
					i_load+=2;
					cha=CharOP.readUnicode(map[i_load],map[i_load+1]);
					CharOP.record(cha);
					if(CharOP.ifrecordis("[map]")){
						i_load+=4;
						key=false;
						break;
					}
				}
			}
			i_load+=2;
		}
		CharOP.clear();
		key=false;
		while(true){
			cha=CharOP.readUnicode(map[i_load],map[i_load+1]);
			if(i_load<map.length-1&&cha==13&&CharOP.readUnicode(map[i_load+2],map[i_load+3])==10){
				i_load+=2;
				key=true;
			}
			if(CharOP.ifrecordis("[end]")){
				i_load+=2;
				break;
			}
			if(key==true){
				try {
					background=Image.createImage(pngpath+new String(CharOP.getChars())+".png");
				} catch (IOException e) {
					e.printStackTrace();
				}
				key=false;
			}
			else{
				CharOP.record(cha);
			}
			i_load+=2;
		}
	}
	protected void LoadGround(){
		CharOP.clear();
		char cha=0;
		boolean key=true;
		while(key){
			cha=CharOP.readUnicode(map[i_load],map[i_load+1]);
			if(cha=='['){
				CharOP.record(cha);
				while(true){
					i_load+=2;
					cha=CharOP.readUnicode(map[i_load],map[i_load+1]);
					CharOP.record(cha);
					if(CharOP.ifrecordis("[ground]")){
						i_load+=4;
						key=false;
						break;
					}
				}
			}
			i_load+=2;
		}
		CharOP.clear();
		int step=-1;
		Ground temp=null;
		Ground module=null;
		key=false;
		while(true){
			cha=CharOP.readUnicode(map[i_load],map[i_load+1]);
			if(cha==32){
				step++;
				key=true;
			}
			if(i_load<map.length-1&&cha==13&&CharOP.readUnicode(map[i_load+2],map[i_load+3])==10){
				step++;
				i_load+=2;
				key=true;
			}
			if(CharOP.ifrecordis("[end]")){
				i_load+=2;
				break;
			}
			if(key==true){
				switch(step){
				case 0:
					temp=new Ground();
					temp.objLive=true;
					temp.sysid=CharOP.getInt();
					break;
				case 1:
					temp.type=CharOP.getInt();
					module=findGround(groundtemp,temp.type);
					temp.width=module.width;
					temp.height=module.height;
					break;
				case 2:
					temp.x=CharOP.getInt();
					break;
				case 3:
					temp.y=CharOP.getInt();
					break;
				case 4:
					temp.AI=CharOP.getInt();
					temp.ai=Grobehavior.CBehavior(temp,temp.AI);
					temp.setMapID();
					addGround(temp);
					step=-1;
					break;
				}
				key=false;
			}
			else{
				CharOP.record(cha);
			}
			i_load+=2;
		}
	}
	protected void LoadCreature(){
		CharOP.clear();
		char cha=0;
		boolean key=true;
		while(key){
			cha=CharOP.readUnicode(map[i_load],map[i_load+1]);
			if(cha=='['){
				CharOP.record(cha);
				while(true){
					i_load+=2;
					cha=CharOP.readUnicode(map[i_load],map[i_load+1]);
					CharOP.record(cha);
					if(CharOP.ifrecordis("[creature]")){
						i_load+=4;
						key=false;
						break;
					}
				}
			}
			i_load+=2;
		}
		CharOP.clear();
		int step=-1;
		Creature temp=null;
		Creature module=null;
		key=false;
		while(true){
			cha=CharOP.readUnicode(map[i_load],map[i_load+1]);
			if(cha==32){
				
				step++;
				key=true;
			}
			if(i_load<map.length-1&&cha==13&&CharOP.readUnicode(map[i_load+2],map[i_load+3])==10){
				step++;
				i_load+=2;
				key=true;
			}
			if(CharOP.ifrecordis("[end]")){
				i_load+=2;
				break;
			}
			if(key==true){
				switch(step){
				case 0:
					temp=new Creature();
					temp.objLive=true;
					temp.sysid=CharOP.getInt();
					break;
				case 1:
					temp.type=CharOP.getInt();
					module=findCreature(creaturetemp,temp.type);
					temp.width=module.width;
					temp.height=module.height;
					temp.step=module.step;
					temp.ActionSpeed=Creature.ckeckSpeed(module.ActionSpeed);
					temp.JumpSpeed=module.JumpSpeed;
					temp.hp=module.hp;
					temp.damage=module.damage;
					temp.sk[0].id=module.sk[0].id;
					temp.sk[0].cool=module.sk[0].cool;
					temp.sk[1].id=module.sk[1].id;
					temp.sk[1].cool=module.sk[1].cool;
					temp.sk[2].id=module.sk[2].id;
					temp.sk[2].cool=module.sk[2].cool;
					break;
				case 2:
					temp.x=CharOP.getInt();
					break;
				case 3:
					temp.y=CharOP.getInt();
					break;
				case 4:
					temp.AI=(byte)CharOP.getInt();
					temp.ai=Crebehavior.CBehavior(temp,temp.AI);
					break;
				case 5:
					temp.side=(byte)CharOP.getInt();
					if(0<temp.x&&temp.x<groundtotal){
						addCreature(temp);
					}
					else{
						System.out.println("out of screen");
					}
					step=-1;
					break;
				}
				key=false;
			}
			else{
				CharOP.record(cha);
			}
			i_load+=2;
		}
	}
	protected void LoadGroundObjInfo(final byte Btemp[]){
		int i=12;
		char cha=0;
		cha=CharOP.readUnicode(Btemp[i],Btemp[i+1]);
		while(true){
			if(i<Btemp.length-1&&cha==13&&CharOP.readUnicode(Btemp[i+2],Btemp[i+3])==10){
				i+=4;
				break;
			}
			i+=2;
			CharOP.record(cha);
			cha=CharOP.readUnicode(Btemp[i],Btemp[i+1]);
		}
		groundtemp=new Ground[CharOP.getInt()];
		int scount=-1;
		int count=0;
		boolean key=false;
		for(;i<Btemp.length-1;i+=2){
			cha=CharOP.readUnicode(Btemp[i],Btemp[i+1]);
			if(cha==32){
				scount++;
				key=true;
			}
			else if(i<Btemp.length-1&&cha==13&&CharOP.readUnicode(Btemp[i+2],Btemp[i+3])==10){
				scount++;
				i+=2;
				key=true;
			}
			else if(cha==35){
				break;
			}
			if(key==true){
				switch(scount){
				case 0:
					groundtemp[count]=new Ground();
					groundtemp[count].type=CharOP.getInt();
					break;
				case 1:
					groundtemp[count].width=CharOP.getInt();
					break;
				case 2:
					groundtemp[count].height=CharOP.getInt();
					scount=-1;
					count++;
					break;
				}
				key=false;
			}
			else{
				CharOP.record(cha);
			}
		}
	}
	protected void LoadCreaturObjInfo(final byte Btemp[]){
		String Cname="[";
		String type="類型";
		String width="長";
		String height="寬";
		String step="步長";
		String speed="移動速度";
		String jumpspeed="跳速度";
		String life="生命";
		String damage="傷害";
		String skill1="技能1";
		String skill2="技能2";
		String skill3="技能3";
		int st=0;
		int count=-1;
		boolean key=false;
		boolean minekey=true;
		int i=12;
		char cha=0;
		cha=CharOP.readUnicode(Btemp[i],Btemp[i+1]);
		while(true){
			if(i<Btemp.length-1&&cha==13&&CharOP.readUnicode(Btemp[i+2],Btemp[i+3])==10){
				i+=4;
				break;
			}
			i+=2;
			CharOP.record(cha);
			cha=CharOP.readUnicode(Btemp[i],Btemp[i+1]);
		}
		int num=CharOP.getInt();
		creaturetemp=new Creature[num];
		while(minekey){
			if(key==true){
				cha=CharOP.readUnicode(Btemp[i],Btemp[i+1]);
				switch(st){
				case 1:
					if(cha==']'){
						creaturetemp[count]=new Creature();
						CharOP.getChars();
						i+=6;
						key=false;
					}
					break;
				case 2:
					if(i<Btemp.length-1&&cha==13&&CharOP.readUnicode(Btemp[i+2],Btemp[i+3])==10){
						creaturetemp[count].type=CharOP.getInt();
						i+=4;
						key=false;
					}
					break;
				case 3:
					if(i<Btemp.length-1&&cha==13&&CharOP.readUnicode(Btemp[i+2],Btemp[i+3])==10){
						creaturetemp[count].width=(byte)CharOP.getInt();
						i+=4;
						key=false;
					}
					break;
				case 4:
					if(i<Btemp.length-1&&cha==13&&CharOP.readUnicode(Btemp[i+2],Btemp[i+3])==10){
						creaturetemp[count].height=(byte)CharOP.getInt();
						i+=4;
						key=false;
					}
					break;
				case 5:
					if(i<Btemp.length-1&&cha==13&&CharOP.readUnicode(Btemp[i+2],Btemp[i+3])==10){
						creaturetemp[count].step=(byte)CharOP.getInt();
						
						i+=4;
						key=false;
					}
					break;
				case 6:
					if(i<Btemp.length-1&&cha==13&&CharOP.readUnicode(Btemp[i+2],Btemp[i+3])==10){
						creaturetemp[count].ActionSpeed=CharOP.getInt();
						
						i+=4;
						key=false;
					}
					break;
				case 7:
					if(i<Btemp.length-1&&cha==13&&CharOP.readUnicode(Btemp[i+2],Btemp[i+3])==10){
						creaturetemp[count].JumpSpeed=CharOP.getInt();
						i+=4;
						key=false;
					}	
					break;
				case 8:
					if(i<Btemp.length-1&&cha==13&&CharOP.readUnicode(Btemp[i+2],Btemp[i+3])==10){
						creaturetemp[count].hp=CharOP.getInt();
						i+=4;
						key=false;
					}
					break;
				case 9:
					if(i<Btemp.length-1&&cha==13&&CharOP.readUnicode(Btemp[i+2],Btemp[i+3])==10){
						creaturetemp[count].damage=CharOP.getInt();
						i+=4;
						key=false;
					}
					break;
				case 10:
					if(i<Btemp.length-1&&cha==13&&CharOP.readUnicode(Btemp[i+2],Btemp[i+3])==10){
						creaturetemp[count].sk[0].id=CharOP.getInt();
						creaturetemp[count].sk[0].cool=damageinfos[creaturetemp[count].sk[0].id].cooldown;
						i+=4;
						key=false;
					}
					break;
				case 11:
					if(i<Btemp.length-1&&cha==13&&CharOP.readUnicode(Btemp[i+2],Btemp[i+3])==10){
						creaturetemp[count].sk[1].id=CharOP.getInt();
						creaturetemp[count].sk[1].cool=damageinfos[creaturetemp[count].sk[1].id].cooldown;
						i+=4;
						key=false;
					}
					break;
				case 12:
					if(i<Btemp.length-1&&cha==13&&CharOP.readUnicode(Btemp[i+2],Btemp[i+3])==10){
						creaturetemp[count].sk[2].id=CharOP.getInt();
						creaturetemp[count].sk[2].cool=damageinfos[creaturetemp[count].sk[2].id].cooldown;
						i+=4;
						key=false;
					}
					break;
				}
				if(key==true){
					CharOP.record(cha);
					i+=2;
				}
			}
			else{
				cha=CharOP.readUnicode(Btemp[i],Btemp[i+1]);
				if(cha=='#'){
					minekey=false;
					break;
				}
				if(i<Btemp.length-1&&cha==13&&CharOP.readUnicode(Btemp[i+2],Btemp[i+3])==10){
					i+=4;
					continue;
				}
				else{
					CharOP.record(cha);
				}
				i+=2;
			}
			if(CharOP.ifrecordis(Cname)){
					CharOP.clear();
					count++;
					st=1;
					key=true;
			}
			else if(CharOP.ifrecordis(type)){
				CharOP.clear();
				i+=2;
				st=2;
				key=true;
				
			}
			else if(CharOP.ifrecordis(width)){
				CharOP.clear();
				i+=2;
				st=3;
				key=true;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人高清av在线| 国产精品电影一区二区三区| 日韩电影在线一区| 日韩久久久久久| 蜜臀精品一区二区三区在线观看 | 亚洲精品精品亚洲| 99久久亚洲一区二区三区青草| 国产午夜三级一区二区三| 处破女av一区二区| 亚洲欧美日韩一区二区 | 国产馆精品极品| 亚洲人成网站影音先锋播放| 91在线无精精品入口| 亚洲一区二区在线视频| 日韩网站在线看片你懂的| 激情久久久久久久久久久久久久久久| 日韩视频永久免费| 床上的激情91.| 日本最新不卡在线| 午夜精品一区二区三区三上悠亚| 国产精品一区二区果冻传媒| 国产日产亚洲精品系列| 欧美日韩在线播放| 国产精品一二三区在线| 亚洲一区二区三区四区在线观看 | 一本大道久久a久久精二百| 美女在线观看视频一区二区| 国产精品区一区二区三| 欧美一级黄色片| 欧洲视频一区二区| 成人av电影在线播放| 青青草原综合久久大伊人精品| 国产精品女同一区二区三区| 91精品国产综合久久蜜臀| 99国产精品一区| 国产成人午夜精品影院观看视频| 亚洲国产成人91porn| 亚洲精品国产视频| 国产日韩欧美a| 久久久久久久久久看片| 欧美挠脚心视频网站| 在线观看欧美黄色| 色婷婷精品大在线视频| 91在线视频免费91| 色老头久久综合| 色天使久久综合网天天| 91论坛在线播放| 在线观看视频一区| 欧美日韩午夜在线视频| 欧美三区免费完整视频在线观看| www.欧美.com| 日韩欧美在线不卡| 欧美精品123区| 日韩一级片网站| 精品日韩欧美在线| 中文成人av在线| 亚洲国产wwwccc36天堂| 一个色妞综合视频在线观看| 国产精品伦理一区二区| 一区二区免费在线| 日本三级韩国三级欧美三级| 日本在线观看不卡视频| 精品一区二区免费在线观看| 国产一区二区三区四| 丁香五精品蜜臀久久久久99网站 | 一区二区三区欧美在线观看| 一区二区三区四区视频精品免费| 亚洲一区二区三区国产| 午夜私人影院久久久久| 久久99国产精品尤物| 99精品1区2区| 日韩欧美国产精品一区| 中文字幕一区二区三区在线播放| 一区二区三区日本| 国产综合久久久久久鬼色| 色婷婷亚洲精品| 久久久综合精品| 黑人巨大精品欧美黑白配亚洲| 欧美精品一区二区三区在线| 91香蕉视频黄| 日韩一区二区三区观看| 国产日韩综合av| 日韩美女视频一区| 亚洲国产日日夜夜| 国产精品1区二区.| 国产视频一区在线观看 | 国产大陆精品国产| 亚洲人成网站色在线观看| 色欧美日韩亚洲| 中文字幕av一区二区三区免费看| 亚洲国产岛国毛片在线| 日韩专区欧美专区| 欧美专区亚洲专区| 中文字幕av一区 二区| 久久国产人妖系列| 666欧美在线视频| 午夜精品福利一区二区三区av| 成人午夜电影小说| 国产色产综合产在线视频| 久久精品国产77777蜜臀| 欧洲精品视频在线观看| ...中文天堂在线一区| 成人av影院在线| 亚洲色图视频免费播放| av中文字幕亚洲| 亚洲视频狠狠干| 91黄色免费版| 天天av天天翘天天综合网| 欧美日本高清视频在线观看| 五月婷婷激情综合网| 日韩写真欧美这视频| 久久99日本精品| 亚洲国产高清不卡| 国产精品三级av| 欧美视频在线一区二区三区| 国产黄色91视频| 亚洲综合色在线| 国产亚洲精品中文字幕| 欧美一区日韩一区| 一本大道久久a久久精二百| 国产一区二区三区四区在线观看 | 精品精品欲导航| 一本色道久久综合亚洲91| 久久er99热精品一区二区| 中文字幕第一页久久| 色综合咪咪久久| 国产精品亚洲第一 | 日本亚洲三级在线| 亚洲欧美激情视频在线观看一区二区三区| 欧美精品一二三四| 欧美性猛交xxxx黑人交| 成人av片在线观看| 国产一区二区中文字幕| 国内精品嫩模私拍在线| 亚洲成a人片综合在线| 亚洲品质自拍视频| 国产欧美日韩麻豆91| 久久久777精品电影网影网| 欧美一区二区三区在线视频| 欧美无乱码久久久免费午夜一区| 成人av影院在线| av在线不卡免费看| 成人a免费在线看| 国产成人午夜视频| 成人深夜在线观看| 成人午夜激情片| 91同城在线观看| 一本大道久久精品懂色aⅴ| 色激情天天射综合网| 欧美二区三区的天堂| 亚洲精品一区在线观看| 日韩精品在线一区二区| 无码av中文一区二区三区桃花岛| 国产精品久久久久天堂| 亚洲成a人v欧美综合天堂下载 | 精品欧美一区二区三区精品久久 | 久久精品免视看| 另类小说一区二区三区| 成人免费毛片片v| 欧美美女视频在线观看| 久久亚洲精华国产精华液 | 欧美精品1区2区| 中文字幕精品一区二区精品绿巨人 | 国产麻豆一精品一av一免费| 免费成人你懂的| 国产**成人网毛片九色| 欧美在线看片a免费观看| 国产网站一区二区三区| 青青草伊人久久| 欧美亚洲国产bt| 国产精品久久久久7777按摩| 亚洲一区二区在线视频| 粉嫩高潮美女一区二区三区| 日韩色在线观看| 亚洲小少妇裸体bbw| 懂色av中文一区二区三区| 日韩精品一区二区三区四区| 一区二区三区免费| 99久久免费国产| 国产精品免费免费| 国产999精品久久久久久| 91精品欧美久久久久久动漫| 亚洲大片免费看| 91蜜桃在线观看| 精品精品国产高清一毛片一天堂| 日韩国产高清影视| 91精品福利在线一区二区三区| 亚洲国产精品人人做人人爽| 国产在线麻豆精品观看| 26uuu国产在线精品一区二区| 另类小说色综合网站| 久久精品这里都是精品| 懂色一区二区三区免费观看| 1区2区3区国产精品| 欧美三级欧美一级| 六月丁香综合在线视频| 国产亚洲精品中文字幕| 国产在线观看一区二区| 日韩一区二区不卡| 国产成人免费视|