1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-23 07:15:12 +00:00

tankman shit maybe

This commit is contained in:
Cameron Taylor 2021-04-09 20:34:25 -04:00
parent 0e373a0d42
commit 3f1552be6e
3 changed files with 45 additions and 3 deletions

View file

@ -1023,6 +1023,17 @@ class PlayState extends MusicBeatState
});
}
/**
* [
* [0, function(){blah;}],
* [4.6, function(){blah;}],
* [25.1, function(){blah;}],
* [30.7, function(){blah;}]
* ]
* SOMETHING LIKE THIS
*/
// var cutsceneFunctions:Array<Dynamic> = [];
function stressIntro()
{
// for story mode shit
@ -1049,11 +1060,12 @@ class PlayState extends MusicBeatState
gfTankmen.antialiasing = true;
gfCutsceneLayer.add(gfTankmen);
var tankCutscene:FlxSprite = new FlxSprite(-70, 320);
var tankCutscene:TankCutscene = new TankCutscene(-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;
bfTankCutsceneLayer.add(tankCutscene); // add();
@ -1142,7 +1154,10 @@ class PlayState extends MusicBeatState
});
}
cutsceneSound.play();
// new FlxTimer().start(0.01, function(tmr) cutsceneSound.play()); // cutsceneSound.play();
// cutsceneSound.play();
tankCutscene.startSyncAudio = cutsceneSound;
// tankCutscene.animation.curAnim.curFrame
FlxG.camera.zoom = defaultCamZoom * 1.15;

27
source/TankCutscene.hx Normal file
View file

@ -0,0 +1,27 @@
package;
import flixel.FlxSprite;
import flixel.system.FlxSound;
class TankCutscene extends FlxSprite
{
public var startSyncAudio:FlxSound;
public function new(x:Float, y:Float)
{
super(x, y);
}
var startedPlayingSound:Bool = false;
override function update(elapsed:Float)
{
if (animation.curAnim.curFrame >= 1 && !startedPlayingSound)
{
startSyncAudio.play();
startedPlayingSound = true;
}
super.update(elapsed);
}
}

View file

@ -425,7 +425,7 @@ class TitleState extends MusicBeatState
}
#if web
if (!initialized && FlxG.keys.justPressed.ENTER)
if (!initialized && controls.ACCEPT)
{
netStream.dispose();
FlxG.stage.removeChild(video);