From 7fa9700664d7303ec4a8e2fff5d11ad97b783bad Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Fri, 9 Apr 2021 11:38:09 -0400 Subject: [PATCH] jeff gameover censor --- source/GameOverSubstate.hx | 8 +++++++- source/LoadingState.hx | 14 ++++++-------- source/TankmenBG.hx | 2 +- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/source/GameOverSubstate.hx b/source/GameOverSubstate.hx index fd082d21e..11a53d5a5 100644 --- a/source/GameOverSubstate.hx +++ b/source/GameOverSubstate.hx @@ -7,6 +7,7 @@ import flixel.math.FlxPoint; import flixel.util.FlxColor; import flixel.util.FlxTimer; import haxe.display.Display.Package; +import ui.PreferencesMenu; class GameOverSubstate extends MusicBeatSubstate { @@ -60,7 +61,12 @@ class GameOverSubstate extends MusicBeatSubstate bf.playAnim('firstDeath'); - randomGameover = FlxG.random.int(1, 25); + var randomCensor:Array = []; + + if (PreferencesMenu.getPref('censor-naughty')) + randomCensor = [1, 3, 8, 13, 17, 21]; + + randomGameover = FlxG.random.int(1, 25, randomCensor); } var playingDeathSound:Bool = false; diff --git a/source/LoadingState.hx b/source/LoadingState.hx index dcb4b1d8e..391b05c53 100644 --- a/source/LoadingState.hx +++ b/source/LoadingState.hx @@ -21,8 +21,6 @@ class LoadingState extends MusicBeatState var stopMusic = false; var callbacks:MultiCallback; - var logo:FlxSprite; - var gfDance:FlxSprite; var danceLeft = false; function new(target:FlxState, stopMusic:Bool) @@ -104,13 +102,13 @@ class LoadingState extends MusicBeatState { super.beatHit(); - logo.animation.play('bump'); + // logo.animation.play('bump'); danceLeft = !danceLeft; - - if (danceLeft) - gfDance.animation.play('danceRight'); - else - gfDance.animation.play('danceLeft'); + /* + if (danceLeft) + gfDance.animation.play('danceRight'); + else + gfDance.animation.play('danceLeft'); */ } override function update(elapsed:Float) diff --git a/source/TankmenBG.hx b/source/TankmenBG.hx index 0109b8ca5..de5bb66c7 100644 --- a/source/TankmenBG.hx +++ b/source/TankmenBG.hx @@ -23,7 +23,7 @@ class TankmenBG extends FlxSprite frames = Paths.getSparrowAtlas('tankmanKilled1'); antialiasing = true; animation.addByPrefix('run', 'tankman running', 24, true); - animation.addByPrefix('shot', 'John', 24, false); + animation.addByPrefix('shot', 'John Shot ' + FlxG.random.int(1, 2), 24, false); animation.play('run'); animation.curAnim.curFrame = FlxG.random.int(0, animation.curAnim.numFrames - 1);