mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-23 15:26:06 +00:00
tnakmen in progres lol
This commit is contained in:
parent
a55dcdc69c
commit
eba2639638
|
@ -113,6 +113,8 @@ class PlayState extends MusicBeatState
|
|||
var bgGirls:BackgroundGirls;
|
||||
var wiggleShit:WiggleEffect = new WiggleEffect();
|
||||
|
||||
var tankmanRun:FlxTypedGroup<TankmenBG>;
|
||||
|
||||
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<TankmenBG>();
|
||||
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)
|
||||
|
|
40
source/TankmenBG.hx
Normal file
40
source/TankmenBG.hx
Normal file
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue