Skip to content

Commit

Permalink
Minor fixes on events
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowMario committed Jan 29, 2025
1 parent 84502e5 commit 548b74a
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion source/states/CreditsState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class CreditsState extends MusicBeatState
{
if (FlxG.sound.music.volume < 0.7)
{
FlxG.sound.music.volume += 0.5 * FlxG.elapsed;
FlxG.sound.music.volume += 0.5 * elapsed;
}

if(!quitting)
Expand Down
2 changes: 1 addition & 1 deletion source/states/FreeplayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ class FreeplayState extends MusicBeatState
return;

if (FlxG.sound.music.volume < 0.7)
FlxG.sound.music.volume += 0.5 * FlxG.elapsed;
FlxG.sound.music.volume += 0.5 * elapsed;

lerpScore = Math.floor(FlxMath.lerp(intendedScore, lerpScore, Math.exp(-elapsed * 24)));
lerpRating = FlxMath.lerp(intendedRating, lerpRating, Math.exp(-elapsed * 12));
Expand Down
2 changes: 1 addition & 1 deletion source/states/stages/Limo.hx
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ class Limo extends BaseStage
//trace('Car drive');
FlxG.sound.play(Paths.soundRandom('carPass', 0, 1), 0.7);

fastCar.velocity.x = (FlxG.random.int(170, 220) / FlxG.elapsed) * 3;
fastCar.velocity.x = FlxG.random.int(30600, 39600);
fastCarCanDrive = false;
carTimer = new FlxTimer().start(2, function(tmr:FlxTimer)
{
Expand Down
5 changes: 3 additions & 2 deletions source/states/stages/Philly.hx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class Philly extends BaseStage
phillyWindowEvent.visible = false;
insert(members.indexOf(blammedLightsBlack) + 1, phillyWindowEvent);

phillyGlowGradient = new PhillyGlowGradient(-400, 225); //This shit was refusing to properly load FlxGradient so fuck it
phillyGlowGradient = new PhillyGlowGradient(-400, 225);
phillyGlowGradient.visible = false;
insert(members.indexOf(blammedLightsBlack) + 1, phillyGlowGradient);
if(!ClientPrefs.data.flashing) phillyGlowGradient.intendedAlpha = 0.7;
Expand All @@ -77,7 +77,7 @@ class Philly extends BaseStage

override function update(elapsed:Float)
{
phillyWindow.alpha -= (Conductor.crochet / 1000) * FlxG.elapsed * 1.5;
phillyWindow.alpha -= (Conductor.crochet / 1000) * elapsed * 1.5;
if(phillyGlowParticles != null)
{
phillyGlowParticles.forEachAlive(function(particle:PhillyGlowParticle)
Expand Down Expand Up @@ -191,6 +191,7 @@ class Philly extends BaseStage
particle.x = -400 + width * i + FlxG.random.float(-width / 5, width / 5);
particle.y = phillyGlowGradient.originalY + 200 + (FlxG.random.float(0, 125) + j * 40);
particle.color = color;
particle.start();
phillyGlowParticles.add(particle);
}
}
Expand Down
2 changes: 1 addition & 1 deletion source/states/stages/objects/PhillyGlowGradient.hx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class PhillyGlowGradient extends FlxSprite
super(x, y);
originalY = y;

loadGraphic(Paths.image('philly/gradient'));
loadGraphic(Paths.image('philly/gradient')); //This shit was refusing to properly load FlxGradient so fuck it
scrollFactor.set(0, 0.75);
setGraphicSize(2000, originalHeight);
updateHitbox();
Expand Down
8 changes: 7 additions & 1 deletion source/states/stages/objects/PhillyGlowParticle.hx
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,27 @@ class PhillyGlowParticle extends FlxSprite
this.color = color;

loadGraphic(Paths.image('philly/particle'));
antialiasing = ClientPrefs.data.antialiasing;
start();
}

public function start()
{
lifeTime = FlxG.random.float(0.6, 0.9);
decay = FlxG.random.float(0.8, 1);
if(!ClientPrefs.data.flashing)
{
decay *= 0.5;
alpha = 0.5;
}
else alpha = 1;

originalScale = FlxG.random.float(0.75, 1);
scale.set(originalScale, originalScale);

scrollFactor.set(FlxG.random.float(0.3, 0.75), FlxG.random.float(0.65, 0.75));
velocity.set(FlxG.random.float(-40, 40), FlxG.random.float(-175, -250));
acceleration.set(FlxG.random.float(-10, 10), 25);
antialiasing = ClientPrefs.data.antialiasing;
}

override function update(elapsed:Float)
Expand Down

0 comments on commit 548b74a

Please sign in to comment.