clean up
This commit is contained in:
parent
be8d84b980
commit
c6e85d2d38
25
cat.html
25
cat.html
|
@ -1042,20 +1042,15 @@ var game = {
|
|||
|
||||
this.resize();
|
||||
|
||||
//if (game.ios) {
|
||||
// this.interval = setInterval(mainloop, 20);
|
||||
//} else {
|
||||
window.requestAnimFrame = (function(){
|
||||
return window.requestAnimationFrame ||
|
||||
window.webkitRequestAnimationFrame ||
|
||||
window.mozRequestAnimationFrame ||
|
||||
window.oRequestAnimationFrame ||
|
||||
window.msRequestAnimationFrame ||
|
||||
function( callback ){
|
||||
window.setTimeout(mainloop, 1000 / 60);
|
||||
};
|
||||
})();
|
||||
//}
|
||||
window.requestAnimFrame = (function(){
|
||||
return window.requestAnimationFrame ||
|
||||
window.webkitRequestAnimationFrame ||
|
||||
window.mozRequestAnimationFrame ||
|
||||
window.oRequestAnimationFrame ||
|
||||
window.msRequestAnimationFrame ||
|
||||
function( callback ){
|
||||
window.setTimeout(mainloop, 1000 / 60);
|
||||
};
|
||||
|
||||
this.canvas.addEventListener('mousedown', this.handlemousedown, false);
|
||||
this.canvas.addEventListener('mouseup', this.handlemouseup, false);
|
||||
|
@ -3332,11 +3327,9 @@ console.log("lev " + lev + " newwid " + newwid + " ratio " + ratio);
|
|||
// find where you clicked
|
||||
if ((realx >= levsel_contx) && (realx <= levsel_contx + levsel_contw) &&
|
||||
(realy >= levsel_conty) && (realy <= levsel_conty + levsel_conth)) {
|
||||
/* TODO: this currently works on ios */
|
||||
//game.setstate("title");
|
||||
wipe.start("title", "out", 15);
|
||||
} else {
|
||||
/* TODO: this DOESN'T works on ios */
|
||||
var gridx,gridy,levsel;
|
||||
|
||||
gridx = Math.floor(adjustx / GRIDSIZE);
|
||||
|
|
Loading…
Reference in New Issue