程序员的知识教程库

网站首页 > 教程分享 正文

一笔连珠(一笔连珠游戏安卓)

henian88 2024-08-15 21:52:45 教程分享 10 ℃ 0 评论

欢迎来到程序小院

一笔连珠

玩法:
拖到金色的泡泡,把白色的泡泡消除掉,一笔完成,总共59关卡,快去闯关吧^^

开始游戏

html

 <div id="spilgames-root"></div>

css

.box{
  position: absolute; 
  left: 50%; 
  top: 0px; 
  width: 320px; 
  height: 480px; 
  margin-top: 0px; 
  margin-right: 0px;
  margin-bottom: 0px; 
  margin-left: -160px; 
  -webkit-user-select: none;
}

js

  var o = I.JSON,
  j = I.document,
  C = I.navigator.userAgent,
  E = I.navigator.language ? I.navigator.language: I.navigator.userLanguage;
  namespace = I.location.href.replace(/\/[^\/]*$/i, "");
  var F = /\?/ig,
  Q = /([^a-z0-9]|^)-([^0-9])/ig,
  c = /^([\W\w]*)\.([^:.]*)(:[\W\w]*)$/i;
  var x = /Webkit/i.test(C) ? "-webkit-": /Gecko/i.test(C) ? "-moz-": "",
  z = "$1" + x + "$2",
  a = {
      computer: !/(iPhone|iPad|iPod|Android)/i.test(C),
      mobile: /(iPhone|iPad|iPod|Android)/i.test(C),
      iOS: /(iPhone|iPad|iPod)/i.test(C),
      iPad: /iPad/i.test(C),
      iPhone: /iPhone/i.test(C),
      iPod: /iPod/i.test(C),
      android: /Android/i.test(C),
      version: parseFloat(/(iPhone|iPad|iPod|Android|Chrome|Safari|Firefox|MSIE)[^0-9]*([0-9._]*)/i.exec(C)[2].replace("_", "."))
  };
  var N, m, G, e, u, g = {},
  l = {},
  B = {},
  K = {};
  var w = Array.prototype.slice,
  s = function(R) {
      var T, U, S = arguments.length;
      while (S-->1) {
          U = arguments[S];
          for (T in U) {
              R[T] = U[T];
          }
      }
      return R;
  },
  h = function(R) {
      if (R.nodeType) {
          return R;
      } else {
          if (R.__mate__ && R.__mate__.nodeType) {
              return R.__mate__;
          }
      }
  },
  v = function(R) {
      while (R && !R.__mate__) {
          R = R.parentNode;
      }
      return R ? R.__mate__: t;
  },
  r = function() {
      I.setTimeout(function() {
          I.scrollTo(0, a.android ? 1 : 0);
      },
      500);
  },
  p = function() {
      if (l.root !== t) {
          var R = h(l.root).getBoundingClientRect();
          m = R.left < 0 ? 0 : R.left;
          G = R.top < 0 ? 0 : R.top;
      }
  },
  y = function(R, S) {
      var T = R.path;
      if ( !! T && typeof R[S] === "function") {
          if (B[S] === t) {
              B[S] = {};
          }
          B[S][T] = R;
      }
  },
  M = function(R, S) {
      var T = R.path;
      if ( !! T) {
          delete B[S][T];
      }
  },
  q = function(U) {
      var S, R, T, V = B[U];
      if (V) {
          T = w.call(arguments, 1);
          for (S in V) { (R = V[S])[U].apply(R, T);
          }
      }
  },
  D = function(X, V, U) {
      var T, S = 0,
      W = K;
      X = X.split(".");
      T = X.length - 1;
      for (; S < T; S++) {
          if (typeof W[X[S]] === "object") {
              W = W[X[S]];
          } else {
              W = W[X[S]] = {};
          }
      }
      if (V === t) {
          return W[X[S]];
      } else {
          W[X[S]] = V;
          if (U === true) {
              try {
                  I.localStorage.setItem(namespace, o.stringify(K));
              } catch(R) {
                  console.log("Local Storage Max");
              }
          }
      }
  },
  k = function(T) {
      var R = 0,
      S = arguments;
      return T.replace(F,
      function() {
          return S[++R];
      });
  },
  J = function(S, R) {
      if ((S = h(S)) !== t) {
          if (R.indexOf(":") !== -1) {
              S.style.cssText += R.replace(Q, z);
          } else {
              return S.style[R];
          }
      }
  },
  L = function(S) {
      var R = 1,
      T = arguments.length,
      U = [];
      while (R < T) {
          U[U.length] = arguments[R++];
          U[U.length - 1].msec = arguments[R++];
      }
      return (function(X) {
          var V, W;
          V = X.shift();
          W = I.setTimeout(function() {
              V.call(S);
              V = X.shift();
              if (V) {
                  W = I.setTimeout(argument.callee, V.msec);
              }
          },
          V.msec);
          return function() {
              I.clearTimeout(W);
          };
      })(U);
  },
  f = function(S, R) {
      return j.elementFromPoint(S + m, R + G);
  },
  n = function(S) {
      var R = h(S).getBoundingClientRect();
      return {
          top: R.top - G,
          left: R.left - m,
          right: R.right - m,
          bottom: R.bottom - G,
          width: R.width,
          height: R.height,
      };
  },
  H = function(W) {
      var V, T, S, R, U = N.store.local && N.store.local[W];
      if (U === t || arguments.callee.lang === W) {
          return;
      }
      N.language = arguments.callee.lang = W;
      V = j.querySelectorAll("*[local]");
      T = V.length;
      while (T--) {
          R = V[T].__mate__;
          S = V[T].getAttribute("local");
          if (R !== t) {
              R.lang ? R.lang(U[S]) : R.text(U[S]);
          }
      }
  },
  d = function(R, S) {
      S = I.prompt(N.store.local[H.lang][R], S || D("system.input." + R));
      if (S !== null) {
          D("system.input." + R, S, true);
      }
      return S !== null ? S: t;
  },
  A = function(R, S) {
      S = ~~S;
      return parseInt(Math.random() * (R + 1 - S) + S);
  },
  i = function(W, R, Y) {
      var T, U, S, V, X;
      if (W === t) {
          return D("system.audio");
      } else {
          if (W.nodeName !== "AUDIO" || (D("system.audio") === false && R !== true)) {
              return t;
          }
      }
      D("system.audio", true, true);
      U = W.readyState !== 4;
      S = !I.isNaN(W.duration);
      if (!U) {
          if (S) {
              W.currentTime = 0;
          }
          W.loop = 1;
          W.play();
          if (S) {
              T = I.setInterval(function() {
                  W.currentTime = 0;
                  W.play();
              },
              (parseInt(W.duration) - 1) * 1000);
          }
          V = function() {
              W.play();
          };
          X = function() {
              W.pause();
          };
          I.addEventListener("pageshow", V, false);
          I.addEventListener("pagehide", X, false);
      }
      if (typeof Y === "function") {
          Y(true);
      }
      return function() {
          if (!U) {
              I.clearInterval(T);
              I.removeEventListener("pageshow", V, false);
              I.removeEventListener("pagehide", X, false);
              W.pause();
          }
          D("system.audio", false, true);
          if (typeof Y === "function") {
              Y(false);
          }
      };
  },
  O = function(R, S) {
      var T;
      T = g[R] = function() {};
      s(T.prototype, S, P.__make__);
      T.prototype.className = R;
  },
  P = function(R, X, W, V, U) {
      var S, T;
      R = h(R);
      if (R !== t && R.__mate__) {
          T = R.__mate__.path + "." + X;
          S = l[T] = new g[W];
          S.name = X;
          S.path = T;
          S.__mate__ = R.appendChild(j.createElement(U || "DIV"));
          S.__mate__.appendChild(j.createElement("DIV"));
          S.__mate__.__mate__ = S;
          J(S, "position: absolute; " + (V || ""));
          return S;
      }
  },
  b = function(U) {
      var S = arguments.callee,
      R = b.__make__[U],
      T = function() {
          if (this.finish === true) {
              return;
          }
          this.finish = true;
          I.setTimeout(function() {
              if (++S.finish >= S.count) {
                  q("after", S.finish, S.count);
                  if (I.location.hash === "#debug") {
                      q("debug");
                  }
              } else {
                  q("load", S.finish, S.count);
              }
          },
          0);
      };
      if (U === t && S.count === 0) {
          T();
      }
      if (S.finish === t) {
          S.count = 0;
          S.finish = 0;
      }
      return R !== t ?
      function(V) {
          S.count++;
          return R.call(S, V, T);
      }: function(V) {
          return V;
      };
  };

源码

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

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

Tags:

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

最近发表
标签列表