欢迎来到程序小院
玩法:点击鼠标左键开始弹奏你的音乐吧,点中一次记录1分,漏点击游戏结束,快去弹奏钢琴吧^^。
开始游戏https://www.ormcc.com/play/gameStart/245
<canvas?id="gameCanvas"?width="640px"?height="1136px"></canvas>
body {
text-align: center;
background: #fff;
padding: 0;
border: 0;
margin: 0;
height: 100%;
}
canvas {
background:#fffdcf;
display:block;
position:absolute;
margin: 0 auto;
padding: 0;
border: 0;
}
//?传入游戏英文名,分数类型为score?或者?level
//?注意!!这里命名一定是meiriq_game,请不要私自命名
(function(){
????//updateShare(0);
????})();
var?meiriq_game?=?new?Meiriq_game("masterpianist",?"score");
window["meiriq_game"].permitStart=1;??//这里需要自己修改参数测试一下?如果是1允许开始
0则不允许开始游戏
function?isMobile(){
return?navigator.userAgent.match(/android|iphone|ipad|ipod|blackberry|meego|symbianos|
windowsphone|ucbrowser/i);
}
if(isMobile()){
????setTimeout(function(){
?????????play_load.finish();
????},4000);
}else{
????setTimeout(function(){
?????????play_load.finish();
????},1000);????
}
this.createjs?=?this.createjs?||?{};
createjs.extend?=?function(t,?e)?{
?"use?strict";
?function?i()?{
??this.constructor?=?t
?}
?i.prototype?=?e.prototype;
?return?t.prototype?=?new?i
};
this.createjs?=?this.createjs?||?{};
createjs.promote?=?function(t,?e)?{
?"use?strict";
?var?i?=?t.prototype,
??s?=?Object.getPrototypeOf?&&?Object.getPrototypeOf(i)?||?i.__proto__;
?if?(s)?{
??i[(e?+=?"_")?+?"constructor"]?=?s.constructor;
??for?(var?r?in?s)?{
???if?(i.hasOwnProperty(r)?&&?typeof?s[r]?==?"function")?{
????i[e?+?r]?=?s[r]
???}
??}
?}
?return?t
};
this.createjs?=?this.createjs?||?{};
createjs.indexOf?=?function(t,?e)?{
?"use?strict";
?for?(var?i?=?0,?s?=?t.length;?i?<?s;?i++)?{
??if?(e?===?t[i])?{
???return?i
??}
?}
?return?-1
};
this.createjs?=?this.createjs?||?{};
(function()?{
?"use?strict";
?function?t(t,?e,?i)?{
??this.type?=?t;
??this.target?=?null;
??this.currentTarget?=?null;
??this.eventPhase?=?0;
??this.bubbles?=?!!?e;
??this.cancelable?=?!!?i;
??this.timeStamp?=?(new?Date).getTime();
??this.defaultPrevented?=?false;
??this.propagationStopped?=?false;
??this.immediatePropagationStopped?=?false;
??this.removed?=?false
?}
?var?e?=?t.prototype;
?e.preventDefault?=?function()?{
??this.defaultPrevented?=?this.cancelable?&&?true
?};
?e.stopPropagation?=?function()?{
??this.propagationStopped?=?true
?};
?e.stopImmediatePropagation?=?function()?{
??this.immediatePropagationStopped?=?this.propagationStopped?=?true
?};
?e.remove?=?function()?{
??this.removed?=?true
?};
?e.clone?=?function()?{
??return?new?t(this.type,?this.bubbles,?this.cancelable)
?};
?e.set?=?function(t)?{
??for?(var?e?in?t)?{
???this[e]?=?t[e]
??}
??return?this
?};
?e.toString?=?function()?{
??return?"[Event?(type="?+?this.type?+?")]"
?};
?createjs.Event?=?t
})();
this.createjs?=?this.createjs?||?{};
(function()?{
?"use?strict";
?function?t()?{
??this._listeners?=?null;
??this._captureListeners?=?null
?}
?var?e?=?t.prototype;
?t.initialize?=?function(t)?{
??t.addEventListener?=?e.addEventListener;
??t.on?=?e.on;
??t.removeEventListener?=?t.off?=?e.removeEventListener;
??t.removeAllEventListeners?=?e.removeAllEventListeners;
??t.hasEventListener?=?e.hasEventListener;
??t.dispatchEvent?=?e.dispatchEvent;
??t._dispatchEvent?=?e._dispatchEvent;
??t.willTrigger?=?e.willTrigger
?};
?e.addEventListener?=?function(t,?e,?i)?{
??var?s;
??if?(i)?{
???s?=?this._captureListeners?=?this._captureListeners?||?{}
??}?else?{
???s?=?this._listeners?=?this._listeners?||?{}
??}
??var?r?=?s[t];
??if?(r)?{
???this.removeEventListener(t,?e,?i)
??}
??r?=?s[t];
??if?(!r)?{
???s[t]?=?[e]
??}?else?{
???r.push(e)
??}
??return?e
?};
?e.on?=?function(t,?e,?i,?s,?r,?n)?{
??if?(e.handleEvent)?{
???i?=?i?||?e;
???e?=?e.handleEvent
??}
??i?=?i?||?this;
??return?this.addEventListener(t,?function(t)?{
???e.call(i,?t,?r);
???s?&&?t.remove()
??},?n)
?};
?e.removeEventListener?=?function(t,?e,?i)?{
??var?s?=?i???this._captureListeners?:?this._listeners;
??if?(!s)?{
???return
??}
??var?r?=?s[t];
??if?(!r)?{
???return
??}
??for?(var?n?=?0,?a?=?r.length;?n?<?a;?n++)?{
???if?(r[n]?==?e)?{
????if?(a?==?1)?{
?????delete?s[t]
????}?else?{
?????r.splice(n,?1)
????}
????break
???}
??}
?};
?e.off?=?e.removeEventListener;
?e.removeAllEventListeners?=?function(t)?{
??if?(!t)?{
???this._listeners?=?this._captureListeners?=?null
??}?else?{
???if?(this._listeners)?{
????delete?this._listeners[t]
???}
???if?(this._captureListeners)?{
????delete?this._captureListeners[t]
???}
??}
?};
?e.dispatchEvent?=?function(t)?{
??if?(typeof?t?==?"string")?{
???var?e?=?this._listeners;
???if?(!e?||?!e[t])?{
????return?false
???}
???t?=?new?createjs.Event(t)
??}?else?if?(t.target?&&?t.clone)?{
???t?=?t.clone()
??}
??try?{
???t.target?=?this
??}?catch?(i)?{}
??if?(!t.bubbles?||?!this.parent)?{
???this._dispatchEvent(t,?2)
??}?else?{
???var?s?=?this,
????r?=?[s];
???while?(s.parent)?{
????r.push(s?=?s.parent)
???}
???var?n,?a?=?r.length;
???for?(n?=?a?-?1;?n?>=?0?&&?!t.propagationStopped;?n--)?{
????r[n]._dispatchEvent(t,?1?+?(n?==?0))
???}
???for?(n?=?1;?n?<?a?&&?!t.propagationStopped;?n++)?{
????r[n]._dispatchEvent(t,?3)
???}
??}
??return?t.defaultPrevented
?};
?e.hasEventListener?=?function(t)?{
??var?e?=?this._listeners,
???i?=?this._captureListeners;
??return?!!(e?&&?e[t]?||?i?&&?i[t])
?};
?e.willTrigger?=?function(t)?{
??var?e?=?this;
??while?(e)?{
???if?(e.hasEventListener(t))?{
????return?true
???}
???e?=?e.parent
??}
??return?false
?};
?e.toString?=?function()?{
??return?"[EventDispatcher]"
?};
?e._dispatchEvent?=?function(t,?e)?{
??var?i,?s?=?e?==?1???this._captureListeners?:?this._listeners;
??if?(t?&&?s)?{
???var?r?=?s[t.type];
???if?(!r?||?!(i?=?r.length))?{
????return
???}
???try?{
????t.currentTarget?=?this
???}?catch?(n)?{}
???try?{
????t.eventPhase?=?e
???}?catch?(n)?{}
???t.removed?=?false;
???r?=?r.slice();
???for?(var?a?=?0;?a?<?i?&&?!t.immediatePropagationStopped;?a++)?{
????var?o?=?r[a];
????if?(o.handleEvent)?{
?????o.handleEvent(t)
????}?else?{
?????o(t)
????}
????if?(t.removed)?{
?????this.off(t.type,?o,?e?==?1);
?????t.removed?=?false
????}
???}
??}
?};
?createjs.EventDispatcher?=?t
})();
需要源码请关注添加好友哦^ ^
转载:欢迎来到本站,转载请注明文章出处
https://ormcc.com/