Hopefully fixed bug where parade things end up "snapping" to wrong x/y location.
This commit is contained in:
parent
dad8a6ff23
commit
be8d84b980
24
cat.html
24
cat.html
|
@ -4261,6 +4261,10 @@ function thing(gridx, gridy, type, text) {
|
||||||
var snaptox = Math.floor(this.gridx * GRIDSIZE + (GRIDSIZE/2) - (this.size/2));
|
var snaptox = Math.floor(this.gridx * GRIDSIZE + (GRIDSIZE/2) - (this.size/2));
|
||||||
var snaptoy = Math.floor(this.gridy * GRIDSIZE + (GRIDSIZE/2) - (this.size/2));
|
var snaptoy = Math.floor(this.gridy * GRIDSIZE + (GRIDSIZE/2) - (this.size/2));
|
||||||
|
|
||||||
|
if (this.isanimating()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.state != "fall" && this.state != "stop") {
|
if (this.state != "fall" && this.state != "stop") {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -4472,20 +4476,32 @@ function thing(gridx, gridy, type, text) {
|
||||||
} else {
|
} else {
|
||||||
if (this.x < nextx) {
|
if (this.x < nextx) {
|
||||||
this.x += this.pathspeed;
|
this.x += this.pathspeed;
|
||||||
if (this.x > nextx) xdone = true;
|
if (this.x >= nextx) {
|
||||||
|
this.x = nextx;
|
||||||
|
xdone = true;
|
||||||
|
}
|
||||||
} else if (this.x > nextx) {
|
} else if (this.x > nextx) {
|
||||||
this.x -= this.pathspeed;
|
this.x -= this.pathspeed;
|
||||||
if (this.x < nextx) xdone = true;
|
if (this.x <= nextx) {
|
||||||
|
this.x = nextx;
|
||||||
|
xdone = true;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
xdone = true;
|
xdone = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.y < nexty) {
|
if (this.y < nexty) {
|
||||||
this.y += this.pathspeed;
|
this.y += this.pathspeed;
|
||||||
if (this.y > nexty) ydone = true;
|
if (this.y >= nexty) {
|
||||||
|
this.y = nexty;
|
||||||
|
ydone = true;
|
||||||
|
}
|
||||||
} else if (this.y > nexty) {
|
} else if (this.y > nexty) {
|
||||||
this.y -= this.pathspeed;
|
this.y -= this.pathspeed;
|
||||||
if (this.y < nexty) ydone = true;
|
if (this.y <= nexty) {
|
||||||
|
this.y = nexty;
|
||||||
|
ydone = true;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
ydone = true;
|
ydone = true;
|
||||||
}
|
}
|
||||||
|
|
26
todo
26
todo
|
@ -7,15 +7,15 @@ phone fixes as per http://www.html5rocks.com/en/mobile/touch/
|
||||||
https://www.smashingmagazine.com/2012/10/design-your-own-mobile-game/
|
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??
|
||||||
|
|
||||||
new title images
|
|
||||||
resize to correct
|
|
||||||
rename to correct
|
|
||||||
git remove old
|
|
||||||
|
|
||||||
.. then git remove new/
|
fix white outline ?
|
||||||
|
|
||||||
white outline ?
|
|
||||||
|
|
||||||
foot/human - cats push it, clear the horiz. line.
|
foot/human - cats push it, clear the horiz. line.
|
||||||
|
|
||||||
|
@ -39,6 +39,8 @@ multiplier for path length
|
||||||
|
|
||||||
doors double entire length
|
doors double entire length
|
||||||
|
|
||||||
|
... then adjust point goal calculation code.
|
||||||
|
|
||||||
|
|
||||||
fireworks when you achieve a goal
|
fireworks when you achieve a goal
|
||||||
*flash for now
|
*flash for now
|
||||||
|
@ -47,19 +49,13 @@ fireworks when you achieve a goal
|
||||||
turn limit.
|
turn limit.
|
||||||
... then get rid of 'form x parades' goal, just have 'clear x cats'
|
... then get rid of 'form x parades' goal, just have 'clear x cats'
|
||||||
... then get rid of 'survive x turns'
|
... then get rid of 'survive x turns'
|
||||||
ticks down on l/r of board.
|
ticks down on L of board.
|
||||||
|
|
||||||
|
|
||||||
show total points on path ??
|
show points for each element along path??
|
||||||
|
|
||||||
|
|
||||||
---------------
|
---------------
|
||||||
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 !!!!
|
|
||||||
it's probably cause of x snap.
|
|
||||||
don't snap when in something other than fall/stop
|
|
||||||
fixed now???????
|
|
||||||
|
|
||||||
|
|
||||||
---------------
|
---------------
|
||||||
|
|
Loading…
Reference in New Issue