Skip to content

Commit

Permalink
wippp
Browse files Browse the repository at this point in the history
  • Loading branch information
ChromaSen committed May 28, 2024
1 parent 53232c4 commit cf7242b
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 77 deletions.
49 changes: 0 additions & 49 deletions source/gameObjects/Stage.hx
Original file line number Diff line number Diff line change
Expand Up @@ -332,55 +332,6 @@ class Stage extends FlxTypedGroup<FlxBasic>
{
case 'hell':
carlos.animation.play('idle', true); //up down left down right left down right down side to side

case 'highway':
// trace('highway update');
grpLimoDancers.forEach(function(dancer:BackgroundDancer)
{
dancer.dance();
});
case 'mall':
upperBoppers.animation.play('bop', true);
bottomBoppers.animation.play('bop', true);
santa.animation.play('idle', true);

case 'school':
bgGirls.dance();

case 'philly':
if (!trainMoving)
trainCooldown += 1;

if (curBeat % 4 == 0)
{
var lastLight:FlxSprite = phillyCityLights.members[0];

phillyCityLights.forEach(function(light:FNFSprite)
{
// Take note of the previous light
if (light.visible == true)
lastLight = light;

light.visible = false;
});

// To prevent duplicate lights, iterate until you get a matching light
while (lastLight == phillyCityLights.members[curLight])
{
curLight = FlxG.random.int(0, phillyCityLights.length - 1);
}

phillyCityLights.members[curLight].visible = true;
phillyCityLights.members[curLight].alpha = 1;

FlxTween.tween(phillyCityLights.members[curLight], {alpha: 0}, Conductor.stepCrochet * .016);
}

if (curBeat % 8 == 4 && FlxG.random.bool(30) && !trainMoving && trainCooldown > 8)
{
trainCooldown = FlxG.random.int(-4, 0);
trainStart();
}
}
}

Expand Down
6 changes: 4 additions & 2 deletions source/gameObjects/userInterface/DialogueBox.hx
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ class DialogueBox extends FlxSpriteGroup
public var textStarted:Bool = false;
public var voiceline:FlxSound;

public static var skipText:FlxText;

public static function createDialogue(thisDialogue:String):DialogueBox
{
//
Expand Down Expand Up @@ -157,13 +159,13 @@ class DialogueBox extends FlxSpriteGroup
add(alphabetText);

// skip text
var skipText = new FlxText(100, 670, 1000, "PRESS SHIFT TO SKIP", 20);
skipText = new FlxText(100, 670, 1000, "PRESS SHIFT TO SKIP", 20);
skipText.alignment = FlxTextAlign.CENTER;

skipText.borderStyle = FlxTextBorderStyle.OUTLINE;
skipText.borderColor = FlxColor.BLACK;
skipText.borderSize = 3;
skipText.alpha=!PlayState.midsongdia?1:0;
skipText.visible=true;


skipText.screenCenter(X);
Expand Down
83 changes: 57 additions & 26 deletions source/meta/state/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ class PlayState extends MusicBeatState

public static var hasInstSwitching:Bool = false; //does the song have multiple instrumentals?
public var overlay:FlxSprite;
public var newdad:Character;


public var grandpaspeech:FlxText;
Expand Down Expand Up @@ -306,7 +305,7 @@ class PlayState extends MusicBeatState
cloaked=new FlxSprite();
cloaked.frames=Paths.getSparrowAtlas('backgrounds/hell/dialogue');
cloaked.animation.addByPrefix('idle','throw',24,false);
cloaked.setPosition(178.05,366.1);
cloaked.setPosition(158.05,366.1);
cloaked.alpha=0;
add(cloaked);
}
Expand Down Expand Up @@ -380,17 +379,20 @@ class PlayState extends MusicBeatState
add(darknessBG);

if(curStage=='hell'){
//newdad=new Character();
//newdad.setCharacter(dadOpponent.x,dadOpponent.y,"grandpadeath");
//insert(members.indexOf(dadOpponent),newdad);

//preloadCharacter("grandpadeath","grandpadeath");
overlay=new FlxSprite().loadGraphic(Paths.image("backgrounds/hell/overlay"));
overlay.updateHitbox();
overlay.scale.set(10,10);
add(overlay);
}

if(SONG.song.toLowerCase()=='reaper-rhythm'){
dadOpponent.visible=false;
cloaked.alpha=1;
trace(
'bye'
);
}

// strum setup
strumLines = new FlxTypedGroup<Strumline>();

Expand Down Expand Up @@ -616,20 +618,16 @@ class PlayState extends MusicBeatState
}

private function getKeyFromEvent(key:FlxKey):Int
{
if (key != NONE)
{
for (i in 0...keysArray.length)
if(key==NONE)return-1;

for(i in 0...keysArray.length)
{
for (j in 0...keysArray[i].length)
{
if (key == keysArray[i][j])
return i;
}
if(keysArray[i].contains(key))return i;
}

return-1;
}
return -1;
}

override public function destroy()
{
Expand Down Expand Up @@ -870,6 +868,16 @@ class PlayState extends MusicBeatState
unspawnNotes.splice(unspawnNotes.indexOf(dunceNote), 1);
}

if(SONG.song.toLowerCase()=='reaper-rhythm'){
if(dialogueBox!=null&&dialogueBox.alive){
if(dialogueBox.curPage==6){
trace('cloak');

cloakreveal();
}
}
}

noteCalls();

if (Init.trueSettings.get('Controller Mode'))
Expand Down Expand Up @@ -1774,15 +1782,6 @@ class PlayState extends MusicBeatState
///*
if (songMusic.time >= Conductor.songPosition + 20 || songMusic.time <= Conductor.songPosition - 20)
resyncVocals();
//*/
/*
if(curSong.toLowerCase()=='granddad battle'){
switch(curStep){
case 30:
dadOpponent=newdad;
}
}
*/
if (curSong.toLowerCase()=='reaper-rhythm'){
switch(curStep){
case 1169:
Expand All @@ -1803,6 +1802,7 @@ class PlayState extends MusicBeatState
dialogueBox = DialogueBox.createDialogue(sys.io.File.getContent(midsongdialoguepath));
trace(dialogueBox);
dialogueBox.cameras = [dialogueHUD];
DialogueBox.skipText.visible=false;
midsongdia=true;
case 1548:
add(dialogueBox);
Expand Down Expand Up @@ -2156,6 +2156,37 @@ class PlayState extends MusicBeatState
dadStrums.visible=boyfriendStrums.visible=true;
}

public function cloakreveal(){
dialogueBox.alphabetText.playSounds=false;
dialogueBox.kill();
dialogueBox.voiceline?.stop();
ForeverTools.killMusic([songDialogue]);

if(cloaked!=null){
FlxTween.tween(camHUD,{alpha:0},0.5);
for (h in strumHUD){
FlxTween.tween(h,{alpha:0},0.5);
}
tweenCam(0.65,0.5);
cloaked.animation.play('idle',false);
cloaked.animation.finishCallback=function(dfsjksdfkj:String){
dadOpponent.visible=true;
cloaked.visible=false;
cloaked.active=false;
tweenCam(0.5,1);
new FlxTimer().start(2,function(sdfjkmasdk:FlxTimer){
FlxTween.tween(camHUD,{alpha:1},1);
for (h in strumHUD){
FlxTween.tween(h,{alpha:1},1);
}
startCountdown();
});
}

}

}

public function songIntroCutscene()
{
if(songDialogue!=null)
Expand Down

0 comments on commit cf7242b

Please sign in to comment.