From ab5d6d2f485898257f16e6ef930348b315fcc901 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 29 Aug 2023 03:11:40 -0400 Subject: [PATCH] sounds in progress --- art | 2 +- assets | 2 +- hmm.json | 2 +- source/funkin/freeplayStuff/DJBoyfriend.hx | 31 ++++++++++++++++++++++ 4 files changed, 34 insertions(+), 3 deletions(-) diff --git a/art b/art index 769b84ffd..61f8e43cf 160000 --- a/art +++ b/art @@ -1 +1 @@ -Subproject commit 769b84ffd7550b18fb3719cf4cb6b48296bdd097 +Subproject commit 61f8e43cf782ad480cd9ed29cd982562becb59a5 diff --git a/assets b/assets index 2d4cd8512..096b42fb7 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 2d4cd85129db9aea8cdba62ef43313f99f13c857 +Subproject commit 096b42fb7d263752cd39ab76ef0cc1bcb391ea51 diff --git a/hmm.json b/hmm.json index bb2832ba8..e830ff435 100644 --- a/hmm.json +++ b/hmm.json @@ -32,7 +32,7 @@ "name": "flxanimate", "type": "git", "dir": null, - "ref": "37fd4ed45011063a38fdfe9bb6091671b3ac6c17", + "ref": "dd2903f", "url": "https://github.com/ninjamuffin99/flxanimate" }, { diff --git a/source/funkin/freeplayStuff/DJBoyfriend.hx b/source/funkin/freeplayStuff/DJBoyfriend.hx index 7292f1dcb..e6e66e876 100644 --- a/source/funkin/freeplayStuff/DJBoyfriend.hx +++ b/source/funkin/freeplayStuff/DJBoyfriend.hx @@ -4,6 +4,7 @@ import flixel.FlxSprite; import flixel.util.FlxSignal; import funkin.util.assets.FlxAnimationUtil; import funkin.graphics.adobeanimate.FlxAtlasSprite; +import flixel.system.FlxSound; class DJBoyfriend extends FlxAtlasSprite { @@ -35,6 +36,15 @@ class DJBoyfriend extends FlxAtlasSprite animOffsets = new Map>(); + anim.callback = function(name, number) { + switch (name) + { + case "Boyfriend DJ watchin tv OG": + if (number == 85) runTvLogic(); + default: + } + }; + setupAnimations(); trace(listAnimations()); @@ -127,6 +137,11 @@ class DJBoyfriend extends FlxAtlasSprite case "Boyfriend DJ watchin tv OG": var frame:Int = FlxG.random.bool(33) ? 112 : 166; + if (FlxG.random.bool(10)) + { + frame = 60; + // boyfriend switches channel code? + } anim.play("Boyfriend DJ watchin tv OG", true, false, frame); // trace('Finished confirm'); } @@ -154,6 +169,22 @@ class DJBoyfriend extends FlxAtlasSprite addOffset('bf dj afk', 0, 0); } + var cartoonSnd:FlxSound; + + public function runTvLogic() + { + if (cartoonSnd == null) + { + // cartoonSnd = new FlxSound(); + // cartoonSnd.loadEmbedded(Paths.sound("cartoons/peck")); + // FlxG.sound.defaultSoundGroup.add(cartoonSnd); + // cartoonSnd.play(); + } + + // play sound of random flash toon + // if tv is already playing, play a new one + } + public function confirm():Void { currentState = Confirm;