Star threshold points at top of screen now update properly as you earn points.
This commit is contained in:
parent
a53c12c408
commit
b21e08f5b5
21
cat.html
21
cat.html
|
@ -1046,9 +1046,10 @@ var game = {
|
|||
window.mozRequestAnimationFrame ||
|
||||
window.oRequestAnimationFrame ||
|
||||
window.msRequestAnimationFrame ||
|
||||
function( callback ){
|
||||
function( callback ) {
|
||||
window.setTimeout(mainloop, 1000 / 60);
|
||||
};
|
||||
})();
|
||||
|
||||
this.canvas.addEventListener('mousedown', this.handlemousedown, false);
|
||||
this.canvas.addEventListener('mouseup', this.handlemouseup, false);
|
||||
|
@ -3431,11 +3432,11 @@ console.log("lev " + lev + " newwid " + newwid + " ratio " + ratio);
|
|||
// remove temp third buffer
|
||||
//document.removeChild(document.getElementById("a"));
|
||||
}
|
||||
|
||||
this.dirty = true;
|
||||
},
|
||||
|
||||
setstate : function(newstate) {
|
||||
|
||||
|
||||
console.log("setstate() = " + newstate);
|
||||
|
||||
if (newstate != this.state) {
|
||||
|
@ -3479,7 +3480,7 @@ console.log("lev " + lev + " newwid " + newwid + " ratio " + ratio);
|
|||
this.winimgsize = 0.1;
|
||||
|
||||
// generate starpoint goal banner for top of screen
|
||||
this.generatestargoalbanner();
|
||||
game.generatestargoalbanner();
|
||||
|
||||
wipe.start("", "in", 50);
|
||||
} else if (newstate == "levselect") {
|
||||
|
@ -4044,6 +4045,10 @@ function thing(gridx, gridy, type, text) {
|
|||
|
||||
this.givepoints = function() {
|
||||
var points = 0;
|
||||
|
||||
var prestars,poststars;
|
||||
prestars = game.calcstars(curlevel, score);
|
||||
|
||||
if (this.type == "food") {
|
||||
points = FOODPOINTS;
|
||||
game.progress("food", 1);
|
||||
|
@ -4070,6 +4075,13 @@ function thing(gridx, gridy, type, text) {
|
|||
|
||||
// add animation
|
||||
things.push(new thing(this.gridx, this.gridy, "text", "+" + points));
|
||||
|
||||
poststars = game.calcstars(curlevel, score);
|
||||
if (poststars != prestars) {
|
||||
// regenerate star colors at top, if required
|
||||
game.generatestargoalbanner();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4563,7 +4575,6 @@ function thing(gridx, gridy, type, text) {
|
|||
function mainloop() {
|
||||
var x, height, gap, minHeight, maxHeight, minGap, maxGap;
|
||||
var i;
|
||||
|
||||
|
||||
requestAnimFrame(mainloop);
|
||||
|
||||
|
|
43
todo
43
todo
|
@ -6,13 +6,29 @@ phone fixes as per http://www.html5rocks.com/en/mobile/touch/
|
|||
----------------------------
|
||||
https://www.smashingmagazine.com/2012/10/design-your-own-mobile-game/
|
||||
|
||||
----------
|
||||
when a parade is going in to a door, they seem to disappear at the wrong place
|
||||
... try slowing them down
|
||||
thing added at top with x = -1 !!!!
|
||||
// fixed xsnap
|
||||
// fixed things moving past their intended pathx/y
|
||||
test again??
|
||||
|
||||
make top star goals light up again!
|
||||
|
||||
|
||||
|
||||
multiplier for path length
|
||||
3 = nothing
|
||||
6 = x2 from now on
|
||||
9 = x3 from now on
|
||||
...etc
|
||||
|
||||
doors double entire length
|
||||
|
||||
... then adjust point goal calculation code.
|
||||
|
||||
|
||||
turn limit.
|
||||
... then get rid of 'form x parades' goal, just have 'clear x cats'
|
||||
... then get rid of 'survive x turns'
|
||||
ticks down on L of board.
|
||||
|
||||
|
||||
...then add more levels
|
||||
|
||||
|
||||
fix white outline ?
|
||||
|
@ -31,25 +47,12 @@ furniture
|
|||
|
||||
|
||||
|
||||
multiplier for path length
|
||||
3 = nothing
|
||||
6 = x2 from now on
|
||||
9 = x3 from now on
|
||||
...etc
|
||||
|
||||
doors double entire length
|
||||
|
||||
... then adjust point goal calculation code.
|
||||
|
||||
|
||||
fireworks when you achieve a goal
|
||||
*flash for now
|
||||
fireworks later.
|
||||
|
||||
turn limit.
|
||||
... then get rid of 'form x parades' goal, just have 'clear x cats'
|
||||
... then get rid of 'survive x turns'
|
||||
ticks down on L of board.
|
||||
|
||||
|
||||
show points for each element along path??
|
||||
|
|
Loading…
Reference in New Issue