File tree 2 files changed +4
-0
lines changed
Arcade/FlxInvaders/source
2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -213,7 +213,9 @@ class PlayState extends FlxState
213
213
function stuffHitStuff (Object1 : FlxObject , Object2 : FlxObject ): Void
214
214
{
215
215
var wallSound : FlxSound = FlxG .sound .play (" assets/wall_break.wav" );
216
+ #if FLX_PITCH
216
217
wallSound .pitch = FlxG .random .float (0.9 , 1.1 );
218
+ #end
217
219
Object1 .kill ();
218
220
Object2 .kill ();
219
221
}
Original file line number Diff line number Diff line change @@ -65,7 +65,9 @@ class PlayerShip extends FlxSprite
65
65
{
66
66
// Play a sound effect when the player shoots with slight random pitch
67
67
var shootSound : FlxSound = FlxG .sound .play (" assets/player_shoot.wav" , 0.5 );
68
+ #if FLX_PITCH
68
69
shootSound .pitch = FlxG .random .float (0.9 , 1.1 );
70
+ #end
69
71
// Space bar was pressed! FIRE A BULLET
70
72
var playState : PlayState = cast FlxG .state ;
71
73
var bullet : FlxSprite = playState .playerBullets .recycle ();
You can’t perform that action at this time.
0 commit comments