From cddb67d984c3805cef2739dd61990ac6f3034bb2 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 2 Feb 2021 03:24:34 -0500 Subject: [PATCH] background girls --- source/BackgroundGirls.hx | 10 ++++++++++ source/Character.hx | 18 ++++++++++++++++++ source/HealthIcon.hx | 1 + source/PlayState.hx | 10 ++++++++++ 4 files changed, 39 insertions(+) diff --git a/source/BackgroundGirls.hx b/source/BackgroundGirls.hx index c15e88e10..57739fbea 100644 --- a/source/BackgroundGirls.hx +++ b/source/BackgroundGirls.hx @@ -9,14 +9,24 @@ class BackgroundGirls extends FlxSprite { super(x, y); + // BG fangirls dissuaded frames = FlxAtlasFrames.fromSparrow('assets/images/weeb/bgFreaks.png', 'assets/images/weeb/bgFreaks.xml'); + animation.addByIndices('danceLeft', 'BG girls group', CoolUtil.numberArray(14), "", 24, false); animation.addByIndices('danceRight', 'BG girls group', CoolUtil.numberArray(30, 15), "", 24, false); + animation.play('danceLeft'); } var danceDir:Bool = false; + public function getScared():Void + { + animation.addByIndices('danceLeft', 'BG fangirls dissuaded', CoolUtil.numberArray(14), "", 24, false); + animation.addByIndices('danceRight', 'BG fangirls dissuaded', CoolUtil.numberArray(30, 15), "", 24, false); + dance(); + } + public function dance():Void { danceDir = !danceDir; diff --git a/source/Character.hx b/source/Character.hx index aa4b63d2b..cb0ef26f0 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -420,6 +420,24 @@ class Character extends FlxSprite setGraphicSize(Std.int(width * 6)); updateHitbox(); + antialiasing = false; + case 'senpai-angry': + frames = FlxAtlasFrames.fromSparrow('assets/images/weeb/senpai.png', 'assets/images/weeb/senpai.xml'); + animation.addByPrefix('idle', 'Angry Senpai Idle', 24, false); + animation.addByPrefix('singUP', 'Angry Senpai UP NOTE', 24, false); + animation.addByPrefix('singLEFT', 'Angry Senpai LEFT NOTE', 24, false); + animation.addByPrefix('singRIGHT', 'Angry Senpai RIGHT NOTE', 24, false); + animation.addByPrefix('singDOWN', 'Angry 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 'spirit': diff --git a/source/HealthIcon.hx b/source/HealthIcon.hx index c5cbee60d..b9810e95c 100644 --- a/source/HealthIcon.hx +++ b/source/HealthIcon.hx @@ -22,6 +22,7 @@ class HealthIcon extends FlxSprite animation.add('face', [10, 11], 0, false, isPlayer); animation.add('dad', [12, 13], 0, false, isPlayer); animation.add('senpai', [22, 22], 0, false, isPlayer); + animation.add('senpai-angry', [22, 22], 0, false, isPlayer); animation.add('spirit', [23, 23], 0, false, isPlayer); animation.add('bf-old', [14, 15], 0, false, isPlayer); animation.add('gf', [16], 0, false, isPlayer); diff --git a/source/PlayState.hx b/source/PlayState.hx index 94e397790..7693f6dcb 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -402,6 +402,9 @@ class PlayState extends MusicBeatState bgGirls = new BackgroundGirls(-100, 190); bgGirls.scrollFactor.set(0.9, 0.9); + if (SONG.song.toLowerCase() == 'roses') + bgGirls.getScared(); + bgGirls.setGraphicSize(Std.int(bgGirls.width * daPixelZoom)); bgGirls.updateHitbox(); add(bgGirls); @@ -556,6 +559,10 @@ class PlayState extends MusicBeatState dad.x += 150; dad.y += 360; camPos.set(dad.getGraphicMidpoint().x + 300, dad.getGraphicMidpoint().y); + case 'senpai-angry': + dad.x += 150; + dad.y += 360; + camPos.set(dad.getGraphicMidpoint().x + 300, dad.getGraphicMidpoint().y); case 'spirit': dad.x -= 150; dad.y += 100; @@ -1325,6 +1332,9 @@ class PlayState extends MusicBeatState case 'senpai': camFollow.y = dad.getMidpoint().y - 430; camFollow.x = dad.getMidpoint().x - 100; + case 'senpai-angry': + camFollow.y = dad.getMidpoint().y - 430; + camFollow.x = dad.getMidpoint().x - 100; } if (dad.curCharacter == 'mom')