From 26f690a264150f01d078ff33b8133ae64870fcdf Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Fri, 9 Apr 2021 22:49:25 -0400 Subject: [PATCH] quieter trailer and GF doin shit --- source/Character.hx | 10 +++++++++- source/PlayState.hx | 33 +++++++++++++++++++-------------- source/TankmenBG.hx | 5 +++++ source/TitleState.hx | 5 +++++ 4 files changed, 38 insertions(+), 15 deletions(-) diff --git a/source/Character.hx b/source/Character.hx index 04a6dce24..bd38df331 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -73,6 +73,14 @@ class Character extends FlxSprite loadOffsetFile(curCharacter); playAnim('danceRight'); + case 'gf-tankmen': + frames = Paths.getSparrowAtlas('characters/gfTankmen'); + animation.addByIndices('sad', 'GF Crying at Gunpoint', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "", 24, true); + animation.addByIndices('danceLeft', 'GF Dancing at Gunpoint', [30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "", 24, false); + animation.addByIndices('danceRight', 'GF Dancing at Gunpoint', [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "", 24, false); + + loadOffsetFile('gf'); + playAnim('danceRight'); case 'bf-holding-gf': frames = Paths.getSparrowAtlas('characters/bfAndGF'); @@ -614,7 +622,7 @@ class Character extends FlxSprite { switch (curCharacter) { - case 'gf' | 'gf-christmas' | 'gf-car' | 'gf-pixel': + case 'gf' | 'gf-christmas' | 'gf-car' | 'gf-pixel' | 'gf-tankmen': if (!animation.curAnim.name.startsWith('hair')) { danced = !danced; diff --git a/source/PlayState.hx b/source/PlayState.hx index 22e3c5922..f59667095 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -543,14 +543,14 @@ class PlayState extends MusicBeatState tankWatchtower = new BGSprite('tankWatchtower', 100, 50, 0.5, 0.5, ['watchtower gradient color']); add(tankWatchtower); + tankmanRun = new FlxTypedGroup(); + add(tankmanRun); + var tankGround:BGSprite = new BGSprite('tankGround', -420, -150); tankGround.setGraphicSize(Std.int(tankGround.width * 1.15)); tankGround.updateHitbox(); add(tankGround); - tankmanRun = new FlxTypedGroup(); - add(tankmanRun); - // smokeLeft.screenCenter(); var fgTank0:BGSprite = new BGSprite('tank0', -500, 650, 1.7, 1.5, ['fg']); @@ -609,6 +609,8 @@ class PlayState extends MusicBeatState gfVersion = 'gf-pixel'; case 'schoolEvil': gfVersion = 'gf-pixel'; + case 'tank': + gfVersion = 'gf-tankmen'; } if (SONG.song.toLowerCase() == 'stress') @@ -625,9 +627,9 @@ class PlayState extends MusicBeatState for (i in 0...TankmenBG.animationNotes.length) { - if (FlxG.random.bool(50)) + if (FlxG.random.bool(16)) { - var tankman:TankmenBG = new TankmenBG(500, 200 + FlxG.random.int(0, 150), TankmenBG.animationNotes[i][1] < 2); + var tankman:TankmenBG = new TankmenBG(500, 200 + FlxG.random.int(50, 100), TankmenBG.animationNotes[i][1] < 2); tankman.strumTime = TankmenBG.animationNotes[i][0]; tankmanRun.add(tankman); } @@ -721,17 +723,17 @@ class PlayState extends MusicBeatState gf.x += 180; gf.y += 300; case "tank": - gf.y += 10; - gf.x -= 30; + gf.y -= 65; + gf.x -= 110; boyfriend.x += 40; boyfriend.y += 0; dad.y += 60; dad.x -= 80; - if (gfVersion != 'pico-speaker') + if (gfVersion == 'gf-tankmen') { - gf.x -= 80; - gf.y -= 75; + gf.x += 80; + // gf.y -= 75; } } @@ -903,8 +905,8 @@ class PlayState extends MusicBeatState switch (curSong.toLowerCase()) { // REMOVE THIS LATER - case 'stress': - stressIntro(); + // case 'stress': + // stressIntro(); default: startCountdown(); @@ -2310,7 +2312,9 @@ class PlayState extends MusicBeatState noteSplash.cameras = [camHUD]; } - songScore += score; + // Only add the score if you're not on practice mode + if (!practiceMode) + songScore += score; /* if (combo > 60) daRating = 'sick'; @@ -2619,7 +2623,8 @@ class PlayState extends MusicBeatState } combo = 0; - songScore -= 10; + if (!practiceMode) + songScore -= 10; FlxG.sound.play(Paths.soundRandom('missnote', 1, 3), FlxG.random.float(0.1, 0.2)); // FlxG.sound.play(Paths.sound('missnote1'), 1, false); diff --git a/source/TankmenBG.hx b/source/TankmenBG.hx index de5bb66c7..3caddc0ac 100644 --- a/source/TankmenBG.hx +++ b/source/TankmenBG.hx @@ -31,6 +31,11 @@ class TankmenBG extends FlxSprite goingRight = isGoingRight; endingOffset = FlxG.random.float(50, 200); + updateHitbox(); + + setGraphicSize(Std.int(width * 0.8)); + updateHitbox(); + tankSpeed = FlxG.random.float(0.6, 1); if (goingRight) diff --git a/source/TitleState.hx b/source/TitleState.hx index f138521c0..c631c6f13 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -157,6 +157,7 @@ class TitleState extends MusicBeatState video.width = video.videoWidth; video.height = video.videoHeight; + // video. } private function netStream_onAsyncError(event:AsyncErrorEvent):Void @@ -179,7 +180,10 @@ class TitleState extends MusicBeatState private function overlay_onMouseDown(event:MouseEvent):Void { + netStream.soundTransform.volume = 0.2; + netStream.soundTransform.pan = -1; netStream.play(Paths.file('music/kickstarterTrailer.mp4')); + FlxG.stage.removeChild(overlay); } @@ -431,6 +435,7 @@ class TitleState extends MusicBeatState FlxG.stage.removeChild(video); startIntro(); + skipIntro(); } #end