1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-12-28 15:57:42 +00:00

Week 3 complete.

This commit is contained in:
Eric Myllyoja 2022-02-26 13:02:28 -05:00
parent 301399200d
commit d795f4fa5c
2 changed files with 1 additions and 94 deletions

View file

@ -106,10 +106,6 @@ class PlayState extends MusicBeatState
var halloweenBG:FlxSprite;
var isHalloween:Bool = false;
var phillyCityLights:FlxTypedGroup<FlxSprite>;
var phillyTrain:FlxSprite;
var trainSound:FlxSound;
var foregroundSprites:FlxTypedGroup<BGSprite>;
var limo:FlxSprite;
@ -157,7 +153,6 @@ class PlayState extends MusicBeatState
#end
var camPos:FlxPoint;
var lightFadeShader:BuildingShaders;
var comboPopUps:PopUpStuff;
@ -1959,18 +1954,6 @@ class PlayState extends MusicBeatState
switch (curStageId)
{
case 'philly':
if (trainMoving)
{
trainFrameTiming += elapsed;
if (trainFrameTiming >= 1 / 24)
{
updateTrainPos();
trainFrameTiming = 0;
}
}
case 'tank':
moveTank();
}
@ -2860,59 +2843,6 @@ class PlayState extends MusicBeatState
var tankSpeed:Float = FlxG.random.float(5, 7);
var tankX:Float = 400;
var trainMoving:Bool = false;
var trainFrameTiming:Float = 0;
var trainCars:Int = 8;
var trainFinishing:Bool = false;
var trainCooldown:Int = 0;
function trainStart():Void
{
trainMoving = true;
trainSound.play(true);
}
var startedMoving:Bool = false;
function updateTrainPos():Void
{
if (trainSound.time >= 4700)
{
startedMoving = true;
gf.playAnim('hairBlow');
}
if (startedMoving)
{
phillyTrain.x -= 400;
if (phillyTrain.x < -2000 && !trainFinishing)
{
phillyTrain.x = -1150;
trainCars -= 1;
if (trainCars <= 0)
trainFinishing = true;
}
if (phillyTrain.x < -4000 && trainFinishing)
trainReset();
}
}
function trainReset():Void
{
gf.playAnim('hairFall');
phillyTrain.x = FlxG.width + 200;
trainMoving = false;
// trainSound.stop();
// trainSound.time = 0;
trainCars = 8;
trainFinishing = false;
startedMoving = false;
}
override function stepHit()
{
super.stepHit();
@ -3044,30 +2974,6 @@ class PlayState extends MusicBeatState
if (FlxG.random.bool(10) && fastCarCanDrive)
fastCarDrive();
case "philly":
if (!trainMoving)
trainCooldown += 1;
if (curBeat % 4 == 0)
{
lightFadeShader.reset();
phillyCityLights.forEach(function(light:FlxSprite)
{
light.visible = false;
});
curLight = FlxG.random.int(0, phillyCityLights.length - 1);
phillyCityLights.members[curLight].visible = true;
// phillyCityLights.members[curLight].alpha = 1;
}
if (curBeat % 8 == 4 && FlxG.random.bool(30) && !trainMoving && trainCooldown > 8)
{
trainCooldown = FlxG.random.int(-4, 0);
trainStart();
}
case 'tank':
tankWatchtower.dance();
}

View file

@ -16,6 +16,7 @@ class BuildingShaders
public function update(elapsed:Float):Void
{
shader.alphaShit.value[0] += elapsed;
trace(shader.alphaShit.value[0]);
}
public function reset()