diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 000000000..13b8461f1 Binary files /dev/null and b/.DS_Store differ diff --git a/source/PlayState.hx b/source/PlayState.hx index 0e72585e5..a9566981c 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -113,6 +113,8 @@ class PlayState extends MusicBeatState var bgGirls:BackgroundGirls; var wiggleShit:WiggleEffect = new WiggleEffect(); + var tankmanRun:FlxTypedGroup; + var talking:Bool = true; var songScore:Int = 0; var scoreTxt:FlxText; @@ -499,6 +501,9 @@ class PlayState extends MusicBeatState var tankGround:BGSprite = new BGSprite('tankGround', -200, -20); add(tankGround); + tankmanRun = new FlxTypedGroup(); + add(tankmanRun); + var fgTank0:BGSprite = new BGSprite('tank0', -290, 400, 1.7, 1.5, ['fg']); foregroundSprites.add(fgTank0); @@ -1538,6 +1543,10 @@ class PlayState extends MusicBeatState if (generatedMusic) { + + + + notes.forEachAlive(function(daNote:Note) { if (daNote.y > FlxG.height) diff --git a/source/TankmenBG.hx b/source/TankmenBG.hx new file mode 100644 index 000000000..defb81a08 --- /dev/null +++ b/source/TankmenBG.hx @@ -0,0 +1,40 @@ +package; + +import flixel.FlxG; +import haxe.display.Display.Package; +import flixel.FlxSprite; + +class TankmenBG extends FlxSprite +{ + + public var strumTime:Float = 0; + public var goingRight:Bool = false; + + public function new(x:Float, y:Float) + { + super(x, y); + + frames = Paths.getSparrowAtlas('tankmanKilled1'); + antialiasing = true; + animation.addByPrefix('run', 'tankman running', 24, true); + animation.addByPrefix('shot', 'John', 24, false); + + animation.play('run'); + } + + override function update(elapsed:Float) { + super.update(elapsed); + + var endDirection:Float = FlxG.width * 0.3; + + if (goingRight) + endDirection = FlxG.width * 0.6; + + x = (endDirection - (Conductor.songPosition - strumTime) * 0.45); + + if (animation.curAnim.name == 'run' && animation.curAnim.finished) + { + kill(); + } + } +} \ No newline at end of file