Merge branch 'master' of github.com:ninjamuffin99/Funkin-secret into nitpix

This commit is contained in:
MtH 2021-04-09 21:10:22 +02:00
commit ed79dd13c9
5 changed files with 155 additions and 69 deletions

View file

@ -16,11 +16,11 @@ class CutsceneAnimTestState extends FlxState
'GF STARTS TO TURN PART 2',
'PICO ARRIVES PART 1',
'PICO ARRIVES PART 2',
'PICO ARRIVES PART 2 POINT FIVE'
'PICO ARRIVES PART 2 POINT FIVE',
'PICO ARRIVES PART 3',
'Pico Dual Wield on Speaker'
];
var coolPosition:FlxPoint = FlxPoint.get(0, 100);
var cutsceneGroup:CutsceneCharacter;
var curSelected:Int = 0;
@ -34,7 +34,7 @@ class CutsceneAnimTestState extends FlxState
gridBG.scrollFactor.set(0.5, 0.5);
add(gridBG);
debugTxt = new FlxText(1000, 20, 0, "", 24);
debugTxt = new FlxText(900, 20, 0, "", 20);
debugTxt.color = FlxColor.BLUE;
add(debugTxt);
@ -47,7 +47,7 @@ class CutsceneAnimTestState extends FlxState
dummyLoader.y = FlxG.height - 20;
}
cutsceneGroup = new CutsceneCharacter(0, 100, 'gfHoldup');
cutsceneGroup = new CutsceneCharacter(0, 0, 'gfHoldup');
add(cutsceneGroup);
// createCutscene(0);
@ -65,6 +65,11 @@ class CutsceneAnimTestState extends FlxState
curSelected -= 1;
if (FlxG.keys.justPressed.DOWN)
curSelected += 1;
if (curSelected < 0)
curSelected = cutsceneGroup.members.length - 1;
if (curSelected >= cutsceneGroup.members.length)
curSelected = 0;
}
else
{
@ -85,12 +90,6 @@ class CutsceneAnimTestState extends FlxState
debugTxt.text = curSelected + " : " + cutsceneGroup.members[curSelected].getPosition();
if (curSelected < 0)
curSelected = animShit.length - 1;
if (curSelected >= animShit.length)
curSelected = 0;
super.update(elapsed);
}
}

View file

@ -35,6 +35,8 @@ class CutsceneCharacter extends FlxTypedGroup<FlxSprite>
{
var xAndY:FlxPoint = FlxPoint.get();
var dumbSplit:Array<String> = i.split('---')[1].trim().split(' ');
trace('cool split: ' + i.split('---')[1]);
trace(dumbSplit);
xAndY.set(Std.parseFloat(dumbSplit[0]), Std.parseFloat(dumbSplit[1]));
animShit.set(i.split('---')[0].trim(), xAndY);
@ -59,8 +61,18 @@ class CutsceneCharacter extends FlxTypedGroup<FlxSprite>
if (daNum + 1 < arrayLMFAOOOO.length)
createCutscene(daNum + 1);
else
ended();
};
add(cutScene);
}
public var onFinish:Void->Void;
public function ended():Void
{
if (onFinish != null)
onFinish();
}
}

View file

@ -34,22 +34,17 @@ class LoadingState extends MusicBeatState
override function create()
{
logo = new FlxSprite(-150, -100);
logo.frames = Paths.getSparrowAtlas('logoBumpin');
logo.antialiasing = true;
logo.animation.addByPrefix('bump', 'logo bumpin', 24);
logo.animation.play('bump');
logo.updateHitbox();
// logoBl.screenCenter();
// logoBl.color = FlxColor.BLACK;
var bg:FlxSprite = new FlxSprite().makeGraphic(FlxG.width, FlxG.height, 0xFFcaff4d);
add(bg);
gfDance = new FlxSprite(FlxG.width * 0.4, FlxG.height * 0.07);
gfDance.frames = Paths.getSparrowAtlas('gfDanceTitle');
gfDance.animation.addByIndices('danceLeft', 'gfDance', [30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "", 24, false);
gfDance.animation.addByIndices('danceRight', 'gfDance', [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "", 24, false);
gfDance.antialiasing = true;
add(gfDance);
add(logo);
var funkay:FlxSprite = new FlxSprite();
funkay.loadGraphic(Paths.image('funkay'));
funkay.setGraphicSize(0, FlxG.height);
funkay.updateHitbox();
funkay.antialiasing = true;
add(funkay);
funkay.scrollFactor.set();
funkay.screenCenter();
initSongsManifest().onComplete(function(lib)
{

View file

@ -124,6 +124,8 @@ class PlayState extends MusicBeatState
var tankmanRun:FlxTypedGroup<TankmenBG>;
var gfCutsceneLayer:FlxGroup;
var bfTankCutsceneLayer:FlxGroup;
var tankWatchtower:BGSprite;
var talking:Bool = true;
var songScore:Int = 0;
@ -534,7 +536,7 @@ class PlayState extends MusicBeatState
var smokeRight:BGSprite = new BGSprite('smokeRight', 1100, -100, 0.4, 0.4, ['SmokeRight'], true);
add(smokeRight);
var tankWatchtower:BGSprite = new BGSprite('tankWatchtower', 100, 50, 0.5, 0.5);
tankWatchtower = new BGSprite('tankWatchtower', 100, 50, 0.5, 0.5, ['watchtower gradient color']);
add(tankWatchtower);
var tankGround:BGSprite = new BGSprite('tankGround', -420, -150);
@ -734,6 +736,9 @@ class PlayState extends MusicBeatState
gfCutsceneLayer = new FlxGroup();
add(gfCutsceneLayer);
bfTankCutsceneLayer = new FlxGroup();
add(bfTankCutsceneLayer);
// Shitty layering but whatev it works LOL
if (curStage == 'limo')
add(limo);
@ -975,7 +980,7 @@ class PlayState extends MusicBeatState
dad.visible = false;
var tankCutscene:FlxSprite = new FlxSprite(20, 320);
tankCutscene.frames = Paths.getSparrowAtlas('cutsceneStuff/tankTalkSong2');
tankCutscene.animation.addByPrefix('tankyguy', 'tankyguy', 24, false);
tankCutscene.animation.addByPrefix('tankyguy', 'TANK TALK 2', 24, false);
tankCutscene.animation.play('tankyguy');
tankCutscene.antialiasing = true;
gfCutsceneLayer.add(tankCutscene); // add();
@ -1008,7 +1013,7 @@ class PlayState extends MusicBeatState
function stressIntro()
{
for (i in 0...5)
for (i in 0...7)
{
var dummyLoader:FlxSprite = new FlxSprite();
dummyLoader.loadGraphic(Paths.image('cutsceneStuff/gfHoldup-' + i));
@ -1019,15 +1024,40 @@ class PlayState extends MusicBeatState
dad.visible = false;
var tankCutscene:FlxSprite = new FlxSprite(20, 320);
tankCutscene.frames = Paths.getSparrowAtlas('cutsceneStuff/tankTalkSong3');
tankCutscene.animation.addByPrefix('tankyguy', 'GodEffing', 24, false);
tankCutscene.animation.addByPrefix('weed', 'sexAmbig', 24, false);
// gf.y += 300;
gf.alpha = 0.01;
var gfTankmen:FlxSprite = new FlxSprite(210, 70);
gfTankmen.frames = Paths.getSparrowAtlas('characters/gfTankmen');
gfTankmen.animation.addByPrefix('loop', 'GF Dancing at Gunpoint', 24, true);
gfTankmen.animation.play('loop');
gfTankmen.antialiasing = true;
gfCutsceneLayer.add(gfTankmen);
var tankCutscene:FlxSprite = new FlxSprite(-70, 320);
tankCutscene.frames = Paths.getSparrowAtlas('cutsceneStuff/tankTalkSong3-pt1');
tankCutscene.animation.addByPrefix('tankyguy', 'TANK TALK 3 P1 UNCUT', 24, false);
// tankCutscene.animation.addByPrefix('weed', 'sexAmbig', 24, false);
tankCutscene.animation.play('tankyguy');
tankCutscene.antialiasing = true;
gfCutsceneLayer.add(tankCutscene); // add();
bfTankCutsceneLayer.add(tankCutscene); // add();
var alsoTankCutscene:FlxSprite = new FlxSprite(20, 320);
alsoTankCutscene.frames = Paths.getSparrowAtlas('cutsceneStuff/tankTalkSong3-pt2');
alsoTankCutscene.animation.addByPrefix('swagTank', 'TANK TALK 3 P2 UNCUT', 24, false);
alsoTankCutscene.antialiasing = true;
bfTankCutsceneLayer.add(alsoTankCutscene);
alsoTankCutscene.y = FlxG.height + 100;
camFollow.setPosition(gf.x + 350, gf.y + 560);
FlxG.camera.focusOn(camFollow.getPosition());
boyfriend.visible = false;
var fakeBF:Character = new Character(boyfriend.x, boyfriend.y, 'bf', true);
bfTankCutsceneLayer.add(fakeBF);
var bfCatchGf:FlxSprite = new FlxSprite(boyfriend.x - 10, boyfriend.y - 90);
bfCatchGf.frames = Paths.getSparrowAtlas('cutsceneStuff/bfCatchesGF');
@ -1037,7 +1067,65 @@ class PlayState extends MusicBeatState
bfCatchGf.visible = false;
var cutsceneSound:FlxSound = new FlxSound();
if (PreferencesMenu.getPref('censor-naughty'))
cutsceneSound.loadEmbedded(Paths.sound('stressCutscene'));
else
{
cutsceneSound.loadEmbedded(Paths.sound('song3censor'));
var censor:FlxSprite = new FlxSprite();
censor.frames = Paths.getSparrowAtlas('cutsceneStuff/censor');
censor.animation.addByPrefix('censor', 'mouth censor', 24);
censor.animation.play('censor');
add(censor);
censor.visible = false;
//
new FlxTimer().start(4.6, function(censorTimer:FlxTimer)
{
censor.visible = true;
censor.setPosition(dad.x + 160, dad.y + 180);
new FlxTimer().start(0.2, function(endThing:FlxTimer)
{
censor.visible = false;
});
});
new FlxTimer().start(25.1, function(censorTimer:FlxTimer)
{
censor.visible = true;
censor.setPosition(dad.x + 120, dad.y + 170);
new FlxTimer().start(0.9, function(endThing:FlxTimer)
{
censor.visible = false;
});
});
new FlxTimer().start(30.7, function(censorTimer:FlxTimer)
{
censor.visible = true;
censor.setPosition(dad.x + 210, dad.y + 190);
new FlxTimer().start(0.4, function(endThing:FlxTimer)
{
censor.visible = false;
});
});
new FlxTimer().start(33.8, function(censorTimer:FlxTimer)
{
censor.visible = true;
censor.setPosition(dad.x + 180, dad.y + 170);
new FlxTimer().start(0.6, function(endThing:FlxTimer)
{
censor.visible = false;
});
});
}
cutsceneSound.play();
@ -1048,7 +1136,7 @@ class PlayState extends MusicBeatState
// cutsceneSound.onComplete = startCountdown;
// Cunt 1
new FlxTimer().start(30.5, function(cunt:FlxTimer)
new FlxTimer().start(31.5, function(cunt:FlxTimer)
{
camFollow.x += 400;
camFollow.y += 150;
@ -1067,56 +1155,32 @@ class PlayState extends MusicBeatState
};
});
// Cunt 2
new FlxTimer().start(33.7, function(cunt:FlxTimer)
{
camFollow.x += 400;
camFollow.y += 180;
FlxG.camera.zoom = defaultCamZoom * 1.5;
FlxTween.tween(FlxG.camera, {zoom: FlxG.camera.zoom + 0.4}, 0.5, {ease: FlxEase.elasticOut});
FlxG.camera.focusOn(camFollow.getPosition());
boyfriend.playAnim('singDOWNmiss');
boyfriend.animation.finishCallback = function(animFinish:String)
{
camFollow.x -= 400;
camFollow.y -= 180;
FlxG.camera.zoom = defaultCamZoom * 1.15;
FlxG.camera.focusOn(camFollow.getPosition());
boyfriend.animation.finishCallback = null;
};
});
new FlxTimer().start(15.1, function(tmr:FlxTimer)
{
camFollow.y -= 170;
camFollow.x += 200;
FlxTween.tween(FlxG.camera, {zoom: FlxG.camera.zoom * 1.3}, 2.1, {
ease: FlxEase.quadInOut,
onComplete: function(twen:FlxTween)
{
FlxTween.tween(FlxG.camera, {zoom: defaultCamZoom}, 0.7, {ease: FlxEase.elasticOut});
}
ease: FlxEase.quadInOut
});
new FlxTimer().start(2.2, function(swagTimer:FlxTimer)
{
// FlxTween.tween(FlxG.camera, {zoom: defaultCamZoom}, 0.7, {ease: FlxEase.elasticOut});
FlxG.camera.zoom = 0.8;
// camFollow.y -= 100;
camFollow.y += 200;
camFollow.x += 200;
boyfriend.visible = false;
bfCatchGf.visible = true;
bfCatchGf.animation.play('catch');
bfTankCutsceneLayer.remove(fakeBF);
bfCatchGf.animation.finishCallback = function(anim:String)
{
bfCatchGf.visible = false;
boyfriend.visible = true;
camFollow.y -= 250;
camFollow.x -= 200;
};
new FlxTimer().start(2, function(weedShitBaby:FlxTimer)
new FlxTimer().start(3, function(weedShitBaby:FlxTimer)
{
camFollow.y += 180;
camFollow.x -= 80;
@ -1124,18 +1188,29 @@ class PlayState extends MusicBeatState
new FlxTimer().start(2.3, function(gayLol:FlxTimer)
{
tankCutscene.animation.play('weed');
bfTankCutsceneLayer.remove(tankCutscene);
alsoTankCutscene.y = 320;
alsoTankCutscene.animation.play('swagTank');
// tankCutscene.animation.play('weed');
});
});
gf.visible = false;
var cutsceneShit:CutsceneCharacter = new CutsceneCharacter(210, 70, 'gfHoldup');
gfCutsceneLayer.add(cutsceneShit);
gfCutsceneLayer.remove(gfTankmen);
cutsceneShit.onFinish = function()
{
gf.alpha = 1;
gf.visible = true;
};
// add(cutsceneShit);
new FlxTimer().start(20, function(alsoTmr:FlxTimer)
{
dad.visible = true;
gfCutsceneLayer.remove(tankCutscene);
bfTankCutsceneLayer.remove(alsoTankCutscene);
startCountdown();
gfCutsceneLayer.remove(cutsceneShit);
});
@ -2830,6 +2905,8 @@ class PlayState extends MusicBeatState
trainCooldown = FlxG.random.int(-4, 0);
trainStart();
}
case 'tank':
tankWatchtower.dance();
}
if (isHalloween && FlxG.random.bool(10) && curBeat > lightningStrikeBeat + lightningOffset)

View file

@ -1,6 +1,7 @@
package;
import flixel.FlxG;
import flixel.FlxGame;
import flixel.FlxSprite;
import flixel.addons.transition.FlxTransitionSprite.GraphicTransTileDiamond;
import flixel.addons.transition.FlxTransitionableState;
@ -56,6 +57,8 @@ class TitleState extends MusicBeatState
// FlxG.bitmap.clearCache();
#end
FlxG.game.focusLostFramerate = 60;
swagShader = new ColorSwap();
FlxG.sound.muteKeys = [ZERO];