load screen and censors

This commit is contained in:
Cameron Taylor 2021-04-09 03:03:27 -04:00
parent 7f80550598
commit 80c6609ef9
3 changed files with 98 additions and 24 deletions

View file

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

View file

@ -123,6 +123,7 @@ class PlayState extends MusicBeatState
var tankmanRun:FlxTypedGroup<TankmenBG>; var tankmanRun:FlxTypedGroup<TankmenBG>;
var gfCutsceneLayer:FlxGroup; var gfCutsceneLayer:FlxGroup;
var bfTankCutsceneLayer:FlxGroup;
var tankWatchtower:BGSprite; var tankWatchtower:BGSprite;
var talking:Bool = true; var talking:Bool = true;
@ -737,6 +738,9 @@ class PlayState extends MusicBeatState
gfCutsceneLayer = new FlxGroup(); gfCutsceneLayer = new FlxGroup();
add(gfCutsceneLayer); add(gfCutsceneLayer);
bfTankCutsceneLayer = new FlxGroup();
add(bfTankCutsceneLayer);
// Shitty layering but whatev it works LOL // Shitty layering but whatev it works LOL
if (curStage == 'limo') if (curStage == 'limo')
add(limo); add(limo);
@ -1022,7 +1026,8 @@ class PlayState extends MusicBeatState
dad.visible = false; dad.visible = false;
gf.visible = false; // gf.y += 300;
gf.alpha = 0.01;
var gfTankmen:FlxSprite = new FlxSprite(210, 70); var gfTankmen:FlxSprite = new FlxSprite(210, 70);
gfTankmen.frames = Paths.getSparrowAtlas('characters/gfTankmen'); gfTankmen.frames = Paths.getSparrowAtlas('characters/gfTankmen');
@ -1031,20 +1036,20 @@ class PlayState extends MusicBeatState
gfTankmen.antialiasing = true; gfTankmen.antialiasing = true;
gfCutsceneLayer.add(gfTankmen); gfCutsceneLayer.add(gfTankmen);
var tankCutscene:FlxSprite = new FlxSprite(20, 320); var tankCutscene:FlxSprite = new FlxSprite(-70, 320);
tankCutscene.frames = Paths.getSparrowAtlas('cutsceneStuff/tankTalkSong3-pt1'); tankCutscene.frames = Paths.getSparrowAtlas('cutsceneStuff/tankTalkSong3-pt1');
tankCutscene.animation.addByPrefix('tankyguy', 'TANK TALK 3 P1 UNCUT', 24, false); tankCutscene.animation.addByPrefix('tankyguy', 'TANK TALK 3 P1 UNCUT', 24, false);
// tankCutscene.animation.addByPrefix('weed', 'sexAmbig', 24, false); // tankCutscene.animation.addByPrefix('weed', 'sexAmbig', 24, false);
tankCutscene.animation.play('tankyguy'); tankCutscene.animation.play('tankyguy');
tankCutscene.antialiasing = true; tankCutscene.antialiasing = true;
gfCutsceneLayer.add(tankCutscene); // add(); bfTankCutsceneLayer.add(tankCutscene); // add();
var alsoTankCutscene:FlxSprite = new FlxSprite(20, 320); var alsoTankCutscene:FlxSprite = new FlxSprite(20, 320);
alsoTankCutscene.frames = Paths.getSparrowAtlas('cutsceneStuff/tankTalkSong3-pt2'); alsoTankCutscene.frames = Paths.getSparrowAtlas('cutsceneStuff/tankTalkSong3-pt2');
alsoTankCutscene.animation.addByPrefix('swagTank', 'TANK TALK 3 P2 UNCUT', 24, false); alsoTankCutscene.animation.addByPrefix('swagTank', 'TANK TALK 3 P2 UNCUT', 24, false);
alsoTankCutscene.antialiasing = true; alsoTankCutscene.antialiasing = true;
gfCutsceneLayer.add(alsoTankCutscene); bfTankCutsceneLayer.add(alsoTankCutscene);
alsoTankCutscene.y = FlxG.height + 100; alsoTankCutscene.y = FlxG.height + 100;
@ -1054,7 +1059,7 @@ class PlayState extends MusicBeatState
boyfriend.visible = false; boyfriend.visible = false;
var fakeBF:Character = new Character(boyfriend.x, boyfriend.y, 'bf', true); var fakeBF:Character = new Character(boyfriend.x, boyfriend.y, 'bf', true);
gfCutsceneLayer.add(fakeBF); bfTankCutsceneLayer.add(fakeBF);
var bfCatchGf:FlxSprite = new FlxSprite(boyfriend.x - 10, boyfriend.y - 90); var bfCatchGf:FlxSprite = new FlxSprite(boyfriend.x - 10, boyfriend.y - 90);
bfCatchGf.frames = Paths.getSparrowAtlas('cutsceneStuff/bfCatchesGF'); bfCatchGf.frames = Paths.getSparrowAtlas('cutsceneStuff/bfCatchesGF');
@ -1064,7 +1069,65 @@ class PlayState extends MusicBeatState
bfCatchGf.visible = false; bfCatchGf.visible = false;
var cutsceneSound:FlxSound = new FlxSound(); var cutsceneSound:FlxSound = new FlxSound();
if (PreferencesMenu.getPref('censor-naughty'))
cutsceneSound.loadEmbedded(Paths.sound('stressCutscene')); 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(); cutsceneSound.play();
@ -1111,7 +1174,7 @@ class PlayState extends MusicBeatState
bfCatchGf.visible = true; bfCatchGf.visible = true;
bfCatchGf.animation.play('catch'); bfCatchGf.animation.play('catch');
gfCutsceneLayer.remove(fakeBF); bfTankCutsceneLayer.remove(fakeBF);
bfCatchGf.animation.finishCallback = function(anim:String) bfCatchGf.animation.finishCallback = function(anim:String)
{ {
@ -1127,7 +1190,7 @@ class PlayState extends MusicBeatState
new FlxTimer().start(2.3, function(gayLol:FlxTimer) new FlxTimer().start(2.3, function(gayLol:FlxTimer)
{ {
gfCutsceneLayer.remove(tankCutscene); bfTankCutsceneLayer.remove(tankCutscene);
alsoTankCutscene.y = 320; alsoTankCutscene.y = 320;
alsoTankCutscene.animation.play('swagTank'); alsoTankCutscene.animation.play('swagTank');
// tankCutscene.animation.play('weed'); // tankCutscene.animation.play('weed');
@ -1139,11 +1202,17 @@ class PlayState extends MusicBeatState
gfCutsceneLayer.add(cutsceneShit); gfCutsceneLayer.add(cutsceneShit);
gfCutsceneLayer.remove(gfTankmen); gfCutsceneLayer.remove(gfTankmen);
cutsceneShit.onFinish = function()
{
gf.alpha = 1;
gf.visible = true;
};
// add(cutsceneShit); // add(cutsceneShit);
new FlxTimer().start(20, function(alsoTmr:FlxTimer) new FlxTimer().start(20, function(alsoTmr:FlxTimer)
{ {
dad.visible = true; dad.visible = true;
gfCutsceneLayer.remove(alsoTankCutscene); bfTankCutsceneLayer.remove(alsoTankCutscene);
startCountdown(); startCountdown();
gfCutsceneLayer.remove(cutsceneShit); gfCutsceneLayer.remove(cutsceneShit);
}); });