game/duimutou/stack.js

(开头部分) 13KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

                                                                                
 var logh=20;
 extraleft=new Array();
 extraleft[1]=6;
 extraleft[2]=4;
 extraleft[3]=5;
 extraleft[4]=5;
 extraright=10;
 var saw=308;
 var sah=247; 
 var stdir;
 var stwidth=new Array();
 var stmargin=new Array();
 var sttype=new Array();
 var ststart=new Array();
 var 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;
 var stinterval;
 var paddingtarget=0,paddingnow=0;
 var gameisover=1;
 var dnd=0;

 function firstinit() {
  document.body.addEventListener("touchmove", function(e) {
          e.preventDefault();
  }, false);

  gamesplayed=getCookie('stack_gamesplayed');
  if(gamesplayed == '') {gamesplayed=0;}
  document.getElementById('gamesplayed').innerHTML=gamesplayed;

  theirbest=getCookie('stack_bestscore');
  if(theirbest == '') {theirbest=0;}
  document.getElementById('yourbest').innerHTML=theirbest;

  imgpreload(new Array('i/dropshadow.png','i/11.png','i/12.png','i/13.png','i/21.png','i/22.png','i/23.png','i/31.png','i//32.png','i/33.png','i/41.png','i/42.png','i/43.png'));
  document.body.addEventListener("touchmove", function(e) {
          e.preventDefault();
  }, false);
 }

 function init() {
  tmp=document.createElement('div');
  tmp.style.position='absolute';
  tmp.style.cursor='pointer';
  if(typeof(tmp.ontouchstart) !== 'undefined') {
	  tmp.ontouchstart=handleclick;
  } else {
  	tmp.onmousedown=handleclick;
  	tmp.onclick = function() {return false;}
  }
  tmp.style.backgroundImage='url(i/stackthelog.png)';
tmp.style.backgroundPosition='center center';
tmp.style.backgroundRepeat='no-repeat';
  tmp.style.width='298px';
  tmp.style.height='55px';
后面还有 341 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。