Bugfix: Crusher to fall indefinitely w/o a time limit
This commit is contained in:
parent
d7f247e4cc
commit
53c72f18d1
|
@ -24,9 +24,10 @@ let direction = "left",
|
||||||
const states = {
|
const states = {
|
||||||
idle: 0,
|
idle: 0,
|
||||||
peeking: 1,
|
peeking: 1,
|
||||||
falling: 2,
|
drop: 2,
|
||||||
hit: 3,
|
falling: 3,
|
||||||
rising: 4,
|
hit: 4,
|
||||||
|
rising: 5,
|
||||||
};
|
};
|
||||||
let state = states.idle;
|
let state = states.idle;
|
||||||
|
|
||||||
|
@ -124,7 +125,7 @@ function main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (below) {
|
if (below) {
|
||||||
state = states.falling;
|
state = states.drop;
|
||||||
} else if (nearby) {
|
} else if (nearby) {
|
||||||
state = states.peeking;
|
state = states.peeking;
|
||||||
}
|
}
|
||||||
|
@ -139,10 +140,16 @@ function main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (below) {
|
if (below) {
|
||||||
state = states.falling;
|
state = states.drop;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
case states.drop:
|
||||||
|
// Begin the fall.
|
||||||
|
Self.ShowLayerNamed("angry");
|
||||||
|
Self.SetVelocity(Vector(0.0, dropSpeed));
|
||||||
|
lastAltitude = -point.Y;
|
||||||
|
state = states.falling;
|
||||||
case states.falling:
|
case states.falling:
|
||||||
Self.ShowLayerNamed("angry");
|
Self.ShowLayerNamed("angry");
|
||||||
Self.SetVelocity(Vector(0.0, dropSpeed));
|
Self.SetVelocity(Vector(0.0, dropSpeed));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user