From c7c80c85fcee6b50ccfc81d14248cf4e120933aa Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Mon, 25 Jan 2021 06:07:45 -0500 Subject: [PATCH] SENPAI IN THE STREETS --- source/Character.hx | 19 +++++++++++++++++++ source/HealthIcon.hx | 1 + source/PlayState.hx | 18 ++++++++++++++++-- 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/source/Character.hx b/source/Character.hx index 2a95a869a..236544734 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -385,6 +385,25 @@ class Character extends FlxSprite antialiasing = false; flipX = true; + case 'senpai': + frames = FlxAtlasFrames.fromSparrow('assets/images/weeb/senpai.png', 'assets/images/weeb/senpai.xml'); + animation.addByPrefix('idle', 'Senpai Idle', 24, false); + animation.addByPrefix('singUP', 'SENPAI UP NOTE', 24, false); + animation.addByPrefix('singLEFT', 'SENPAI LEFT NOTE', 24, false); + animation.addByPrefix('singRIGHT', 'SENPAI RIGHT NOTE', 24, false); + animation.addByPrefix('singDOWN', 'SENPAI DOWN NOTE', 24, false); + + addOffset('idle'); + addOffset("singUP", 5, 37); + addOffset("singRIGHT"); + addOffset("singLEFT", 40); + addOffset("singDOWN", 14); + + setGraphicSize(Std.int(width * 6)); + updateHitbox(); + + antialiasing = false; + case 'parents-christmas': frames = FlxAtlasFrames.fromSparrow('assets/images/christmas/mom_dad_christmas_assets.png', 'assets/images/christmas/mom_dad_christmas_assets.xml'); diff --git a/source/HealthIcon.hx b/source/HealthIcon.hx index 87d9cac2a..14fc69ee7 100644 --- a/source/HealthIcon.hx +++ b/source/HealthIcon.hx @@ -21,6 +21,7 @@ class HealthIcon extends FlxSprite animation.add('tankman', [8, 9], 0, false, isPlayer); animation.add('face', [10, 11], 0, false, isPlayer); animation.add('dad', [12, 13], 0, false, isPlayer); + animation.add('senpai', [12, 13], 0, false, isPlayer); animation.add('bf-old', [14, 15], 0, false, isPlayer); animation.add('gf', [16], 0, false, isPlayer); animation.add('parents-christmas', [17], 0, false, isPlayer); diff --git a/source/PlayState.hx b/source/PlayState.hx index e314fed55..736d644ff 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -464,6 +464,9 @@ class PlayState extends MusicBeatState dad.y += 300; case 'parents-christmas': dad.x -= 500; + case 'senpai': + dad.x += 150; + dad.y += 300; } boyfriend = new Boyfriend(770, 450, SONG.player1); @@ -1147,9 +1150,18 @@ class PlayState extends MusicBeatState { camFollow.setPosition(dad.getMidpoint().x + 150, dad.getMidpoint().y - 100); // camFollow.setPosition(lucky.getMidpoint().x - 120, lucky.getMidpoint().y + 210); + + switch (dad.curCharacter) + { + case 'mom': + camFollow.y = dad.getMidpoint().y; + case 'senpai': + camFollow.y = dad.getMidpoint().y - 430; + camFollow.x = dad.getMidpoint().x - 100; + } + if (dad.curCharacter == 'mom') - camFollow.y = dad.getMidpoint().y; - vocals.volume = 1; + vocals.volume = 1; if (SONG.song.toLowerCase() == 'tutorial') { @@ -1167,6 +1179,8 @@ class PlayState extends MusicBeatState camFollow.x = boyfriend.getMidpoint().x - 300; case 'mall': camFollow.y = boyfriend.getMidpoint().y - 200; + case 'school': + camFollow.x = boyfriend.getMidpoint().x - 200; } if (SONG.song.toLowerCase() == 'tutorial')