Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions assets/data/stages/philly.hx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ function create() {
// defaultCamZoom = 0.5;
phillyTrain.moves = true; // Def value false in funkinsprite
light.color = colors[curColor];
lightGlow.color = light.color;
trainSound = FlxG.sound.load(Paths.sound("train_passes"));
}

Expand All @@ -32,6 +33,7 @@ function beatHit(curBeat:Int) {
if (newColor >= curColor) newColor++;
curColor = newColor;
light.color = colors[curColor];
lightGlow.color = light.color;
}

if (!trainMoving)
Expand All @@ -50,6 +52,8 @@ function update(elapsed:Float) {
else
light.alpha = 0;

lightGlow.alpha = light.alpha - 0.25;

if (trainMoving) {
updateTrainPos();
}
Expand All @@ -69,7 +73,7 @@ function updateTrainPos():Void
if (trainSound.time >= 4700)
{
startedMoving = true;
gf.playAnim('hairBlow');
if (gf != null) gf.playAnim('hairBlow');
}

if (startedMoving)
Expand Down Expand Up @@ -100,4 +104,4 @@ function trainReset():Void
trainFinishing = false;
startedMoving = false;
phillyTrain.velocity.x = 0;
}
}
11 changes: 7 additions & 4 deletions assets/data/stages/philly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
<sprite name="bg" x="-100" y="0" sprite="sky" scroll="0.1" zoomfactor="0"/>
<sprite name="city" x="-10" y="0" sprite="city" scroll="0.3" scale="0.85" updateHitbox="true" zoomfactor="0.3"/>
<sprite name="light" x="-10" y="0" sprite="win" scroll="0.3" scale="0.85" updateHitbox="true" zoomfactor="0.3"/>
<sprite name="streetBehind" x="-40" y="50" sprite="behindTrain" zoomfactor="1" />
<sprite name="phillyTrain" x="2000" y="360" sprite="train" zoomfactor="1" />
<sprite name="street" x="-40" y="50" sprite="street" zoomfactor="1" />
</stage>
<sprite name="lightGlow" x="-10" y="0" sprite="winGlow" scroll="0.3" scale="0.85" updateHitbox="true" zoomfactor="0.3">
<property name="blend" type="float" value="1.0"/>
</sprite>
<sprite name="streetBehind" x="-40" y="50" sprite="behindTrain" zoomfactor="1.0" />
<sprite name="phillyTrain" x="2000" y="360" sprite="train" zoomfactor="1.0" />
<sprite name="street" x="-40" y="50" sprite="street" zoomfactor="1.0" />
</stage>
Binary file added assets/images/stages/philly/winGlow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions assets/songs/monster/scripts/vignette.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
function create() {
if (!Options.gameplayShaders) {
disableScript();
return;
}
vignette = new CustomShader('coloredVignette');
vignette.color = [0, 0, 0];
vignette.amount = 1;
vignette.strength = 1 - (health / 2) / 1.5;
camGame.addShader(vignette);
}

function update(elapsed:Float) {
var bg = stage.stageSprites.get('bg');
var targetStrength:Float = 1 - (health / 2) / 1.5;
if (bg.animation.name == 'lightning' && !bg.animation.finished)
vignette.strength = 0.075;
else
vignette.strength = lerp(vignette.strength, targetStrength, 0.1);
}

function onGameOver() {
FlxTween.tween(vignette, {"strength": 0.075}, 1, {ease: FlxEase.quadOut});
}