From eba2639638294f5a73c092a63a617b771ee39d18 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 16 Mar 2021 01:51:23 -0400 Subject: [PATCH] tnakmen in progres lol --- .DS_Store | Bin 0 -> 6148 bytes source/PlayState.hx | 9 +++++++++ source/TankmenBG.hx | 40 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 .DS_Store create mode 100644 source/TankmenBG.hx diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..13b8461f1ea6d3567f1587911c9b05007868d1ff GIT binary patch literal 6148 zcmeHK%Wl&^6upy#)Japw0*P*rykQqrNsCasKuXd?5Q#^H5i9_uPHY+@#}ma4DTJWx z`2tw*3w#G(z_+l1Gvg7mot7o7(A;R|%;TP!xo2!ohKN{u<}`?^L}VZdER>O*VWMB8 zHOr}%Yd|K(;KPB>2dIhRv}pyj0+(F@@$TlyrYS`|KlT2$(6jSPnhc@{uMj_%A__CU z-~Q%1n1>VfUHCqj_+A**>pxg7U$|1-FpRQM-YUPcMtp8Xb~Fpy_Vk6Q9of-npvq4< z_y3gb!86aD_p8?rc@WuN;7%pkb6mK*eC`DfpSSrea6&nb6?Yg$$td-!+l$5S{z1*$ zYwRy;=Hg(tUNdj+-B~V6#*JHzyS?M_yZ4I^%a5OB$i(njlO|+J+80z(g1oh+fzN{z zvtcEfz#STslNOHMgl|&h0y)HKm=&0P%J@~V4X4A9qCN#3U9am3+5Wf9RS zl=Cwzp<0qvq9=%@MIEfPd)E4-c1cE2>NLZuhUBJ47izJq3AHfU#h7}yjm?XhUeBr( z&h8c| zI{KT+e-&d)CnjgcIBI65ZYWG$J(wxoi8W)?xmG|ckX9fcSF7Uu@1B4EPm^>_E1(tl zuM}W~j@4-+Bz3l~1t-p06X_U9nDAT0C@IL)aV!hsDBebrhCWjifK7#~7|{aLe*~lq LI@1dLQw4ql?KS=I literal 0 HcmV?d00001 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