欢迎来到程序小院
- 玩法:
- 对准对方猫点击鼠标左键进行扑街,碰到敌方猫扑街X1,不要让对方猫碰到自己,统计扑街次数,快去玩功夫猫吧^^。
开始游戏https://www.ormcc.com/play/gameStart/189
<canvas id="gameCanvas"></canvas>
- h2.title{
- display: block;
- margin: 50px auto;
- text-align: center;
- }
- #gameCanvas canvas {
- image-rendering: optimizeSpeed;
- image-rendering: -moz-crisp-edges;
- image-rendering: -webkit-optimize-contrast;
- image-rendering: -o-crisp-edges;
- image-rendering: optimize-contrast;
- -ms-interpolation-mode: nearest-neighbor;
- }
- var cc = cc || {};
- cc._tmp = cc._tmp || {};
- cc._LogInfos = {};
- _p = window;
- _p = Object.prototype;
- delete window._p;
- cc.newElement = function (a) {
- return document.createElement(a)
- };
- cc._addEventListener = function (a, b, c, d) {
- a.addEventListener(b, c, d)
- };
- cc._isNodeJs = "undefined" !== typeof require && require("fs");
- cc.each = function (a, b, c) {
- if (a)if (a instanceof Array)for (var d = 0, e = a.length; d < e && !1 !==
- b.call(c, a[d], d); d++); else for (d in a)if (!1 === b.call(c, a[d], d))break
- };
- cc.isCrossOrigin = function (a) {
- if (!a)return cc.log("invalid URL"), !1;
- var b = a.indexOf("://");
- if (-1 == b)return!1;
- b = a.indexOf("/", b + 3);
- return(-1 == b ? a : a.substring(0, b)) != location.origin
- };
- cc.async = {_counterFunc: function (a) {
- var b = this.counter;
- if (!b.err) {
- var c = b.length, d = b.results, e = b.option, f = e.cb, g = e.cbTarget, h = e.trigger, e = e.triggerTarget;
- if (a) {
- if (b.err = a, f)return f.call(g, a)
- } else {
- var k = Array.apply(null, arguments).slice(1), l = k.length;
- 0 == l ? k = null : 1 == l && (k = k[0]);
- d[this.index] = k;
- b.count--;
- h && h.call(e, k, c - b.count, c);
- 0 == b.count && f && f.apply(g, [null, d])
- }
- }
- }, _emptyFunc: function () {
- }, parallel: function (a, b, c) {
- var d = cc.async;
- if (void 0 !== c)"function" == typeof b && (b = {trigger: b}), b.cb = c || b.cb; else if (void 0 !==
- b)"function" == typeof b && (b = {cb: b}); else if (void 0 !== a)b = {}; else throw"arguments error!";
- var e = (c = a instanceof Array) ? a.length : Object.keys(a).length;
- if (0 == e)b.cb && b.cb.call(b.cbTarget, null); else {
- var f = {length: e, count: e, option: b, results: c ? [] : {}};
- cc.each(a, function (a, c) {
- if (f.err)return!1;
- var e = !b.cb && !b.trigger ? d._emptyFunc : d._counterFunc.bind({counter: f, index: c});
- a(e, c)
- })
- }
- }, map: function (a, b, c) {
- var d = this, e = arguments.length;
- "function" == typeof b && (b = {iterator: b});
- if (3 === e)b.cb = c || b.cb; else if (2 > e)throw"arguments error!";
- "function" == typeof b && (b = {iterator: b});
- if (void 0 !== c)b.cb = c || b.cb; else if (void 0 === a)throw"arguments error!";
- var f = (e = a instanceof Array) ? a.length : Object.keys(a).length;
- if (0 === f)b.cb && b.cb.call(b.cbTarget, null); else {
- var g = {length: f, count: f, option: b, results: e ? [] : {}};
- cc.each(a, function (a, c) {
- if (g.err)return!1;
- var e = !b.cb ? d._emptyFunc : d._counterFunc.bind({counter: g, index: c});
- b.iterator.call(b.iteratorTarget, a, c, e)
- })
- }
- }};
- cc.path = {join: function () {
- for (var a = arguments.length, b = "", c = 0; c < a; c++)b = (b + ("" == b ? "" : "/") + arguments[c]).replace(/(\/|\\\\)$/, "");
- return b
- }, extname: function (a) {
- return(a = /(\.[^\.\/\?\\]*)(\?.*)?$/.exec(a)) ? a[1] : null
- }, mainFileName: function (a) {
- if (a) {
- var b = a.lastIndexOf(".");
- if (-1 !== b)return a.substring(0, b)
- }
- return a
- }, basename: function (a, b) {
- var c = a.indexOf("?");
- 0 < c && (a = a.substring(0, c));
- c = /(\/|\\\\)([^(\/|\\\\)]+)$/g.exec(a.replace(/(\/|\\\\)$/, ""));
- if (!c)return null;
- c = c[2];
- return b && a.substring(a.length -
- b.length).toLowerCase() == b.toLowerCase() ? c.substring(0, c.length - b.length) : c
- }, dirname: function (a) {
- return a.replace(/((.*)(\/|\\|\\\\))?(.*?\..*$)?/, "$2")
- }, changeExtname: function (a, b) {
- b = b || "";
- var c = a.indexOf("?"), d = "";
- 0 < c && (d = a.substring(c), a = a.substring(0, c));
- c = a.lastIndexOf(".");
- return 0 > c ? a + b + d : a.substring(0, c) + b + d
- }, changeBasename: function (a, b, c) {
- if (0 == b.indexOf("."))return this.changeExtname(a, b);
- var d = a.indexOf("?"), e = "";
- c = c ? this.extname(a) : "";
- 0 < d && (e = a.substring(d), a = a.substring(0, d));
- d = a.lastIndexOf("/");
- return a.substring(0, 0 >= d ? 0 : d + 1) + b + c + e
- }};
需要源码请关注添加好友哦^ ^
转载:欢迎来到本站,转载请注明文章出处
https://ormcc.com/