From 7c75bfaf31f8209d426e00a2ea15b4a1d49d45b3 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Thu, 8 Apr 2021 12:33:19 -0400 Subject: [PATCH] tank cutscene GUNS --- source/PlayState.hx | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index b7224d7b5..b3a473338 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -890,6 +890,8 @@ class PlayState extends MusicBeatState ughIntro(); case 'stress': stressIntro(); + case 'guns': + gunsIntro(); default: startCountdown(); @@ -908,7 +910,7 @@ class PlayState extends MusicBeatState tankCutscene.animation.addByPrefix('killYou', 'TANK TALK 1 P2', 24, false); tankCutscene.animation.play('wellWell'); tankCutscene.antialiasing = true; - add(tankCutscene); + gfCutsceneLayer.add(tankCutscene); camHUD.visible = false; @@ -944,7 +946,7 @@ class PlayState extends MusicBeatState new FlxTimer().start((Conductor.crochet / 1000) * 5, function(money:FlxTimer) { dad.visible = true; - remove(tankCutscene); + gfCutsceneLayer.remove(tankCutscene); }); cameraMovement(); @@ -956,6 +958,37 @@ class PlayState extends MusicBeatState }); } + function gunsIntro() + { + camFollow.y += 100; + + FlxTween.tween(FlxG.camera, {zoom: defaultCamZoom * 1.3}, 4, {ease: FlxEase.quadInOut}); + + 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.play('tankyguy'); + tankCutscene.antialiasing = true; + gfCutsceneLayer.add(tankCutscene); // add(); + + FlxG.sound.play(Paths.sound('tankSong2')); + + FlxTween.tween(FlxG.camera, {zoom: defaultCamZoom * 1.4}, 0.4, {ease: FlxEase.quadOut, startDelay: 4.1}); + FlxTween.tween(FlxG.camera, {zoom: defaultCamZoom * 1.3}, 0.7, {ease: FlxEase.quadInOut, startDelay: 4.55}); + + new FlxTimer().start(11, function(tmr:FlxTimer) + { + FlxTween.tween(FlxG.camera, {zoom: defaultCamZoom}, (Conductor.crochet * 9) / 1000, {ease: FlxEase.quartInOut}); + startCountdown(); + new FlxTimer().start((Conductor.crochet * 25) / 1000, function(daTim:FlxTimer) + { + dad.visible = true; + gfCutsceneLayer.remove(tankCutscene); + }); + }); + } + function stressIntro() { for (i in 0...5)