堆木头小游戏

堆木头小游戏欢迎来到程序小院堆木头小游戏玩法:当木头移动到木头堆正上方时,按下按钮放木头,尽可能的对齐木头^^开始游戏html <div class

大家好,欢迎来到IT知识分享网。

欢迎来到程序小院

堆木头小游戏

玩法: 当木头移动到木头堆正上方时,按下按钮放木头,尽可能的对齐木头^^ 

开始游戏

堆木头小游戏

html

 <div class="baidu_share"> <!-- Baidu Button BEGIN --> <div id="bdshare" class="bdshare_t bds_tools_32 get-codes-bdshare" style="margin-left:20px;"> <a class="bds_tsina"></a> <a class="bds_qzone"></a> <a class="bds_t"></a> <a class="bds_douban"></a> <a class="bds_renren"></a> <a class="shareCount"></a> </div> <!-- Baidu Button END --> <br style="clear: both"> </div> 

css

.ibox {width:320px; height:315px; overflow:hidden; background-color: #000000; margin:auto;} .iboxcontent {width:320px; height:315px; float:left; overflow:hidden;} .ibc1 {background-color: #3b4859; background-image:url(/default/game/dmt/bg1.png);} .ibc2 {background-color: #404d5e; background-image:url(/default/game/dmt/bg2.png);} #alertbox {display:none;position:absolute; z-index:200;} #alertbox_flekk {position:absolute; width:320px; height: 316px; background-color:#000000; opacity: .8;} #alertbox_content {position:absolute; width:320px; height:286px; margin-top:70px; text-align:center; color:#ffffff;} #alertbox_content .fontostext {color:#a3b3c3;} #alertbox a {margin:10px; width:114px; height:54px; } 

js

 function showaronk(srid,srtype,srstart,srsize) { srt='/default/game/dmt/'+srtype tmp=document.createElement('div'); tmp.style.position='absolute'; tmp.style.width=extraleft[srtype]+srsize+extraright/2+'px'; tmp.style.height=logh+'px'; tmp.style.zIndex=15; tmp2=document.createElement('div'); tmp2.style.position='absolute'; tmp2.style.width=srsize+'px'; tmp2.style.height=logh+'px'; tmp2.style.marginLeft=extraleft[srtype]+'px'; tmp2.style.backgroundImage='url('+srt+'2.png)'; tmp2.style.backgroundPosition=srstart+'px 0'; tmp.appendChild(tmp2); tmp2=document.createElement('img'); tmp2.src=srt+'3.png'; tmp2.style.marginLeft=extraleft[srtype]+srsize-extraright/2; tmp2.style.position='absolute'; tmp.appendChild(tmp2); tmp2=document.createElement('img'); tmp2.src=srt+'1.png'; tmp2.style.position='absolute'; tmp.appendChild(tmp2); getId(srid).appendChild(tmp); } function gameover() { gameisover=1; gamesplayed++; setCookie('stack_gamesplayed',gamesplayed); document.getElementById('gamesplayed').innerHTML=gamesplayed; if(stscore>theirbest) { setCookie('stack_bestscore',stscore); document.getElementById('yourbest').innerHTML=stscore; theirbest=stscore; ialert('<h1>游戏结束: '+stscore+'分</h1>厉害,你又破纪录了','restartgame();'); } else { ialert('<h1>游戏结束: '+stscore+'</h1>再来一次?','restartgame();'); } //urchinTracker('/stack/gamesplayed/'); return false; } function restartgame() { clearInterval(stinterval); gameisover=0; stwidth=new Array(); stmargin=new Array(); sttype=new Array(); ststart=new Array(); stscore=0; sts=0; stwidth[0]=260; //a ronk maga! ststart[0]=(stwidth[0]-270)*Math.random(); stmargin[0]=(saw-stwidth[0])/2; //ronk margoja! sttype[0]=Math.floor(Math.random()*4)+1; paddingtarget=0,paddingnow=0; dnd=0; getId('combo').innerHTML=0; getId('level').innerHTML=1; getId('score').innerHTML=stscore; getId('score').styleColor='red'; getId('st_outerarea').innerHTML=''; init(); } function getCookie(Name) { var search = Name + "=" if (document.cookie.length > 0) { offset = document.cookie.indexOf(search) if (offset != -1) { offset += search.length end = document.cookie.indexOf(";", offset) if (end == -1) end = document.cookie.length; return unescape(document.cookie.substring(offset, end)) } } return(''); } function setCookie(name, value) { document.cookie = name + "=" + escape(value) + ((expire == null) ? "" : ("; expires=" + expire.toGMTString())+';domain=lapp.xinli001.com;path=/;'); } function setTI(todos,interval) { if(stispace[todos].length == 0) {delete stispace[todos];return false;} eval(stispace[todos].shift()); setTimeout('setTI('+todos+','+interval+')',interval); } 

源码

需要源码请关注添加好友哦^ ^

转载:欢迎来到本站,转载请注明文章出处https://ormcc.com/

堆木头小游戏

免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://yundeesoft.com/74750.html

(0)

相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注微信