1 |
if (global.turntimer > 1 && swatchbc.red_count > swatchbc.blue_count && (x - xstart) > 20 && i_ex(swatchbc)) |
2 |
{ |
3 |
yy = ystart; |
4 |
var _spikeHeight; |
5 |
if ((swatchbc.shockwave_x_1 + 100) > x) |
6 |
_spikeHeight = x - (swatchbc.shockwave_x_1 - 100); |
7 |
else |
8 |
_spikeHeight = x - (swatchbc.shockwave_x_2 - 100); |
9 |
if (_spikeHeight >= 0 && _spikeHeight < 280) |
10 |
{ |
11 |
_spikeHeight /= 7; |
12 |
var duration = 30; |
13 |
var at = duration / 2; |
14 |
var psuedoscale = 0; |
15 |
if (_spikeHeight < 20) |
16 |
psuedoscale = _spikeHeight / at; |
17 |
else if (_spikeHeight < duration) |
18 |
psuedoscale = (at - (_spikeHeight - at)) / at; |
19 |
psuedoscale = -1 * psuedoscale * (psuedoscale - 2); |
20 |
yy -= (psuedoscale * 60); |
21 |
} |
22 |
if (yy < y && !lidOff) |
23 |
{ |
24 |
lidOff = true; |
25 |
lidSpeed = -12; |
26 |
platterLid.y = ystart + lidSpeed; |
27 |
timer = 0; |
28 |
} |
29 |
y = yy; |
30 |
} |