diff --git a/cat.html b/cat.html index 0a019c2..1eee338 100644 --- a/cat.html +++ b/cat.html @@ -52,6 +52,8 @@ var curlevel = 1; var lastmx = -1, lastmy = -1; +var mbdown = false; + var FLASHSPEED = 0.05; @@ -3237,6 +3239,9 @@ console.log("lev " + lev + " newwid " + newwid + " ratio " + ratio); handlemousedown : function(event) { var coords,adjustx,adjusty,realx,realy; event.preventDefault(); + + mbdown = true; + coords = getmousexy(event); adjustx = coords[0]; adjusty = coords[1]; @@ -3413,6 +3418,7 @@ console.log("lev " + lev + " newwid " + newwid + " ratio " + ratio); event.preventDefault(); + if (!mbdown) return; if (game.state != "running") return; game.dirty = true; // need to redraw @@ -3458,6 +3464,8 @@ console.log("lev " + lev + " newwid " + newwid + " ratio " + ratio); event.preventDefault(); + mbdown = false; + if (game.state != "running") return; game.dirty = true; // need to redraw diff --git a/todo b/todo index 018a8e0..dbfc074 100644 --- a/todo +++ b/todo @@ -32,8 +32,6 @@ https://www.smashingmagazine.com/2012/10/design-your-own-mobile-game/ ---------- -*use image instead of unicode for yellow stars. - ----------