Skip to content

Commit 9314203

Browse files
committed
Update Trampoline.hx
fixed it lol
1 parent 76cf400 commit 9314203

File tree

1 file changed

+29
-25
lines changed

1 file changed

+29
-25
lines changed

source/archipelago/Trampoline.hx

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class Trampoline extends FlxSprite {
7171
var combo_counter:FlxText;
7272
var debugTxt:FlxText;
7373

74-
function spawnComboThingy(thingy, points) {
74+
function spawnComboThingy(thingy, pointss) {
7575
combo_timer = null;
7676
combo_timer_fade = null;
7777

@@ -88,13 +88,15 @@ class Trampoline extends FlxSprite {
8888
combo_counter.alpha = 1;
8989

9090
combo_label.text = thingy;
91+
92+
var pointsSt:String;
9193

92-
if (points == 0)
93-
points = "";
94+
if (pointss == 0)
95+
pointsSt = "";
9496
else
95-
points = "(+"..points..")";
97+
pointsSt = '(+$pointss)';
9698

97-
combo_counter.text = "x"..combo.." "..points;
99+
combo_counter.text = 'x$combo $pointsSt';
98100

99101
combo_label.height = 40;
100102

@@ -182,7 +184,7 @@ class Trampoline extends FlxSprite {
182184
// setProperty('botplayTxt.visible', true)
183185

184186
if (DEBUG_MODE)
185-
APPlayState.instance.add("debugTxt");
187+
APPlayState.instance.add(debugTxt);
186188

187189
if (APPlayState.instance.songName == "Senpai") { // LORE
188190
if (!jumping) {
@@ -199,14 +201,16 @@ class Trampoline extends FlxSprite {
199201
function checkIfBrokeNeck() {
200202
var angle = APPlayState.instance.boyfriend.angle % 360;
201203

202-
@:privateAccess
203-
if !(safetyMode && PlayState.SONG.notes[APPlayState.instance.curSection].mustHitSection) {
204-
if (tricksLastBounce == 0) {
205-
if (combo != 0)
206-
combo = 0;
207-
spawnComboThingy(points.get('lost')[2], 0);
208-
else
209-
combo = 0;
204+
@:privateAccess {
205+
if (!(safetyMode && PlayState.SONG.notes[APPlayState.instance.curSection].mustHitSection)) {
206+
if (tricksLastBounce == 0) {
207+
if (combo != 0) {
208+
combo = 0;
209+
spawnComboThingy(points.get('lost')[2], 0);
210+
}
211+
else
212+
combo = 0;
213+
}
210214
}
211215
}
212216
tricksLastBounce = 0;
@@ -221,7 +225,7 @@ class Trampoline extends FlxSprite {
221225
bouncing = false;
222226
jumping = false;
223227
APPlayState.instance.boyfriend.velocity.y = 0;
224-
die(true);
228+
APPlayState.instance.die(true);
225229
isHeFuckingDead = true;
226230
} else if (lastJumpHeight == -1)
227231
APPlayState.instance.health -= 0.25;
@@ -265,8 +269,8 @@ class Trampoline extends FlxSprite {
265269
if (FlxG.keys.justPressed.SPACE) {
266270
posY = APPlayState.instance.boyfriend.y; // get the start point
267271
APPlayState.instance.boyfriend.velocity.y = -jumpheight * 0.5;
268-
jumping = true
269-
bouncing = true
272+
jumping = true;
273+
bouncing = true;
270274
}
271275
}
272276
else
@@ -278,10 +282,10 @@ class Trampoline extends FlxSprite {
278282
APPlayState.instance.boyfriend.playAnim('hey', true);
279283
APPlayState.instance.boyfriend.specialAnim = true;
280284
APPlayState.instance.boyfriend.heyTimer = 0.6;
281-
addScore(points.get('peak')[2]);
285+
APPlayState.instance.comboManager.songScore += points.get('peak')[2];
282286
combo++;
283287
tricksLastBounce++; // SAFE
284-
spawnComboThingy(points.get('peak')[3], get('peak').peak[2]);
288+
spawnComboThingy(points.get('peak')[3], points.get('peak')[2]);
285289

286290
}
287291
}
@@ -314,7 +318,7 @@ class Trampoline extends FlxSprite {
314318
lastJumpHeight = 2;
315319
lastlastjumpheight = 2; // prevent conflict
316320
if (points.get('highJump')[1])
317-
addScore(points.get('highJump')[2]);
321+
APPlayState.instance.comboManager.songScore += points.get('highJump')[2];
318322
}
319323
else if (lastlastjumpheight == -1 || lastlastjumpheight == -2) {
320324
additional = jumpheight * -0.2;
@@ -333,7 +337,7 @@ class Trampoline extends FlxSprite {
333337
}
334338
else {
335339
// setProperty("boyfriend.velocity.x",getProperty('boyfriend.velocity.x')+50) // https://twitter.com/aflaccck/status/1595932461082763264
336-
if (APPlayState.instance.controls.NOTE_LEFT);
340+
if (APPlayState.instance.controls.NOTE_LEFT)
337341
tilt = tilt - 0.5;
338342

339343
if (APPlayState.instance.controls.NOTE_RIGHT)
@@ -355,23 +359,23 @@ class Trampoline extends FlxSprite {
355359
combo++;
356360
tricksLastBounce++;
357361
styleRot = styleRot - 360;
358-
addScore(points.get('backflip')[2] * (combo * 1.1));
362+
APPlayState.instance.comboManager.songScore += Std.int(points.get('backflip')[2] * (combo * 1.1));
359363
APPlayState.instance.boyfriend.playAnim('hey', true);
360364
APPlayState.instance.boyfriend.specialAnim = true;
361365
APPlayState.instance.boyfriend.heyTimer = 0.6;
362-
spawnComboThingy(points.get('backflip')[3], points.get('backflip')[2] * (combo * 1.1));
366+
spawnComboThingy(points.get('backflip')[3], Std.int(points.get('backflip')[2] * (combo * 1.1)));
363367
}
364368

365369
if (styleRot <= -360 && points.get('frontflip')[1]) {
366370
// FUCCIN FRONTFLIP
367371
combo++;
368372
styleRot = styleRot + 360;
369373
tricksLastBounce++;
370-
addScore(points.get('frontflip')[2] * (combo * 1.1));
374+
APPlayState.instance.comboManager.songScore += Std.int(points.get('frontflip')[2] * (combo * 1.1));
371375
APPlayState.instance.boyfriend.playAnim('hey', true);
372376
APPlayState.instance.boyfriend.specialAnim = true;
373377
APPlayState.instance.boyfriend.heyTimer = 0.6;
374-
spawnComboThingy(points.get('frontflip')[3],points.get('frontflip')[2] * (combo * 1.1));
378+
spawnComboThingy(points.get('frontflip')[3], Std.int(points.get('frontflip')[2] * (combo * 1.1)));
375379
}
376380
}
377381

0 commit comments

Comments
 (0)