From 02590653d37fdbcd5e2cb2898ee4379d5f7d6bc7 Mon Sep 17 00:00:00 2001 From: Rain Clark Date: Sun, 9 Oct 2016 05:30:10 -0400 Subject: [PATCH] Sound effect now plays when new thought pops up --- assets/sounds/Thought.ogg | Bin 0 -> 135648 bytes source/HUD.hx | 23 +++++++++++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 assets/sounds/Thought.ogg diff --git a/assets/sounds/Thought.ogg b/assets/sounds/Thought.ogg new file mode 100644 index 0000000000000000000000000000000000000000..2327926aa5af5aed92254791fe5c0a244d8dd90b GIT binary patch literal 135648 zcmeI5dsI_-mhXQF0g{MR0s(`C)=3Dj2zG+O1`4Y}cqRfuNEGO@3j!z)wL~7RHSJ7* zpaB5^fkH$Z5RjL&SYnlS_uME?6)8aRQC%}_S+=58GpnoY?z!DPz3%-b1XA6z*37#9 z+?BJk&q@yacii7!Z7@d{NRIq+f=!EMMTjD2lf)VnMH&qC+7gMKQlXrC@IRruf^vb zC^<|dl zX=s<7?${6&WgC$Yj7GkH<9T`Sp8VmwGgos5ukOEdIpEG^C(|K_f)6n+9eHiN|K+hK zttIDwen@ktg-D87P8E7i6$+x2f~i9RjwZs>2x}@;22321#1=`Wio)?Dwm9lmQ~cfE z$G@>6f>Cyaq+-vBLeE>6hBENpq2OIb+a4ArJj5uBME?7w%rstbA-uDDTJp8@E%liu zELwb8ZYMp`Y59}z0s78oMB7~3>${=OZNKg4=bX8Bqe^wg_ga7J8IywhW<9>bTKeBU zJ<)M`uB~WR?$p+^9362v<9M-u0l(()qTPAYBNHE&x6tO;|2P%DH*K!%dEYe-j;fl@ z_>NvvEuYUkEc$=kK6@kdOZ<+i&(9QGW9-J!pR(Kk{Vv1!+TRZ!Db_9X5qI)zIdQbk zLBrwo@=k3mKIwd_Lp<%@y|K0~M$uo9r1bFZDK0lvP9UUXnMU!-$~2UhM{##!weYsz z$1_290*tGnvDvV%FO9Jxoy2$)2L$6$Ts!*wT+wi7TtUz1gY->3O-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q@2AOZs9AOI6CIdp<7ZIl2Q)JBDevdKXJ3`!22AWIu100y;D z;h}7D5HR!C}X{igVCYvM_-N2#|vSOt|FG39__N0$@-Z6&}ha2LUiBIdp<7 zZIl2Q)JBDevdKZf+*A5bOSVopyw&W(gPxLw2}D4E90Xv(C5KLsrHv8*gW9O@P&PRT zfI-Qj6J%+l1i+v+Dm;`;4g%($5{t5$?phrEB~WqzMF83BZKA ziUI;4V0{F@pw_1eWCR3O34lRYQ9u9$td9T~)cQ1mjDWx@0dr3&#L`oG1MlngJT?wJ zrBz4}00EK^fC-l*LP46gNdOFLo4P~QBq0C>C5cdwrfm`cgW9I#LPa_9tE+9&}qsErB_Ws`#d7?d13L6$a3 z01RrQ!b92QAYkq(6~>td0N})aoRGgn)pBfVronxAc@;@y@rVU&TXD$wCPtAV3ZRFyWFzC&ycgIZWX1O%*(02tKjB!Ps0fQ5j$r*z5EQ*y&QCH~Jg zKu^g+2_hgs4gxUYl0zrR(nbk@L2XocD4QGvz@X&N39__N0$@-Z6&}ha2LW?WY24CN za>t2BzpU5r(~f75fC5;0hn;fp%Y|jqXfX9HYz-nO%4KJP;%%5 zS=uN8FsO|R4`q{sfVrpijisl=#fcLgXOf|(L=FWZOCVq&028i-1w=r=>Ii^Atxgh1 z2nbjRfI%%RAOZqbM*s|Jb&^0rK)^!4+*3l-)t5YQ^vFPGLQiQG2?RiZBm`i>C5cdw zrfm`cgW9Iwg0WhfbX#yDmfmH%v&{Y%=00HYG00y-_O&}v6uu8z(Q}VO)l-|Vq z7|$aQKu>8E5(GeiBm`i>C5cdwrfm`cgW9I // Sounds private var _sndSelect:FlxSound; private var _sndNext:FlxSound; + private var _sndThought:FlxSound; // Time Display private var _txtTime:FlxText; @@ -135,6 +136,8 @@ class HUD extends FlxTypedGroup // Sound _sndSelect = FlxG.sound.load(AssetPaths.Select__ogg); _sndNext = FlxG.sound.load(AssetPaths.Next__ogg); + _sndThought = FlxG.sound.load(AssetPaths.Thought__ogg); + // Menu Selecter _sprSelect = new FlxSprite(0, 0, AssetPaths.tmpSelect__png); @@ -209,17 +212,17 @@ class HUD extends FlxTypedGroup // Need Bubble if (_gel.CurrentNeed == Gel.Need.NONE) - _sprThoughts.animation.play("none", false); + showThought("none"); else if (_gel.CurrentNeed == Gel.Need.HUNGRY) - _sprThoughts.animation.play("hungry", false); + showThought("hungry"); else if (_gel.CurrentNeed == Gel.Need.POOPY) { // The odds of the Gel willing to communicate its about to make Waste if (FlxG.random.bool((((_gel.Discipline * 3) + _gel.Intellect)) / 4)) - _sprThoughts.animation.play("poopy", false); + showThought("poopy"); } else if (_gel.CurrentNeed == Gel.Need.SLEEPY) - _sprThoughts.animation.play("sleepy", false); + showThought("sleepy"); // Update time display _txtTime.text = Std.string(_clock.CurrentHour) + ":00"; @@ -382,6 +385,18 @@ class HUD extends FlxTypedGroup // TODO: Make Config menu and call it here } + private function showThought(thought:String):Void + { + if (_sprThoughts.animation.name == thought) + return; + else + { + _sprThoughts.animation.play(thought, false); + if (thought != "none") + _sndThought.play(true); + } + } + private function itemJoin(animation:String):Void { _sprInteraction.visible = true;