mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-09-12 05:07:06 +00:00
tank rolling lol XD
This commit is contained in:
parent
2f63837430
commit
b501d620b8
|
@ -23,6 +23,7 @@ import flixel.graphics.atlas.FlxAtlas;
|
|||
import flixel.graphics.frames.FlxAtlasFrames;
|
||||
import flixel.group.FlxGroup.FlxTypedGroup;
|
||||
import flixel.group.FlxGroup;
|
||||
import flixel.math.FlxAngle;
|
||||
import flixel.math.FlxMath;
|
||||
import flixel.math.FlxPoint;
|
||||
import flixel.math.FlxRect;
|
||||
|
@ -133,6 +134,7 @@ class PlayState extends MusicBeatState
|
|||
var gfCutsceneLayer:FlxGroup;
|
||||
var bfTankCutsceneLayer:FlxGroup;
|
||||
var tankWatchtower:BGSprite;
|
||||
var tankGround:BGSprite;
|
||||
|
||||
var talking:Bool = true;
|
||||
var songScore:Int = 0;
|
||||
|
@ -554,9 +556,14 @@ class PlayState extends MusicBeatState
|
|||
var smokeRight:BGSprite = new BGSprite('smokeRight', 1100, -100, 0.4, 0.4, ['SmokeRight'], true);
|
||||
add(smokeRight);
|
||||
|
||||
// tankGround.
|
||||
|
||||
tankWatchtower = new BGSprite('tankWatchtower', 100, 50, 0.5, 0.5, ['watchtower gradient color']);
|
||||
add(tankWatchtower);
|
||||
|
||||
tankGround = new BGSprite('tankRolling', 300, 300, 0.5, 0.5, ['BG tank w lighting'], true);
|
||||
add(tankGround);
|
||||
|
||||
tankmanRun = new FlxTypedGroup<TankmenBG>();
|
||||
add(tankmanRun);
|
||||
|
||||
|
@ -565,6 +572,8 @@ class PlayState extends MusicBeatState
|
|||
tankGround.updateHitbox();
|
||||
add(tankGround);
|
||||
|
||||
moveTank();
|
||||
|
||||
// smokeLeft.screenCenter();
|
||||
|
||||
var fgTank0:BGSprite = new BGSprite('tank0', -500, 650, 1.7, 1.5, ['fg']);
|
||||
|
@ -1950,7 +1959,11 @@ class PlayState extends MusicBeatState
|
|||
}
|
||||
}
|
||||
|
||||
lightFadeShader.update((Conductor.crochet / 1000) * FlxG.elapsed * 1.5); // phillyCityLights.members[curLight].alpha -= (Conductor.crochet / 1000) * FlxG.elapsed;
|
||||
lightFadeShader.update((Conductor.crochet / 1000) * FlxG.elapsed * 1.5);
|
||||
// phillyCityLights.members[curLight].alpha -= (Conductor.crochet / 1000) * FlxG.elapsed;
|
||||
|
||||
case 'tank':
|
||||
moveTank();
|
||||
}
|
||||
|
||||
super.update(elapsed);
|
||||
|
@ -2824,6 +2837,22 @@ class PlayState extends MusicBeatState
|
|||
});
|
||||
}
|
||||
|
||||
function moveTank():Void
|
||||
{
|
||||
var daAngleOffset:Float = 1;
|
||||
tankAngle += FlxG.elapsed * tankSpeed;
|
||||
tankGround.angle = tankAngle - 90 + 15;
|
||||
|
||||
tankGround.x = tankX + Math.cos(FlxAngle.asRadians((tankAngle * daAngleOffset) + 180)) * 1500;
|
||||
tankGround.y = 1300 + Math.sin(FlxAngle.asRadians((tankAngle * daAngleOffset) + 180)) * 1100;
|
||||
}
|
||||
|
||||
var tankResetShit:Bool = false;
|
||||
var tankMoving:Bool = false;
|
||||
var tankAngle:Float = FlxG.random.int(-90, 45);
|
||||
var tankSpeed:Float = FlxG.random.float(5, 7);
|
||||
var tankX:Float = 400;
|
||||
|
||||
var trainMoving:Bool = false;
|
||||
var trainFrameTiming:Float = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue