1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-12-27 15:37:49 +00:00

BACKGROUNDS

This commit is contained in:
Cameron Taylor 2020-10-05 13:55:48 -07:00
parent b40f7c94b8
commit 082abad735
5 changed files with 21 additions and 5 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
assets/images/stageback.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

View file

@ -71,26 +71,42 @@ class PlayState extends FlxTransitionableState
persistentUpdate = true; persistentUpdate = true;
persistentDraw = true; persistentDraw = true;
var bg:FlxSprite = new FlxSprite(-600, -200).loadGraphic(AssetPaths.bg__png); var bg:FlxSprite = new FlxSprite(-600, -200).loadGraphic(AssetPaths.stageback__png);
bg.setGraphicSize(Std.int(bg.width * 2.5)); // bg.setGraphicSize(Std.int(bg.width * 2.5));
bg.updateHitbox(); // bg.updateHitbox();
bg.antialiasing = true; bg.antialiasing = true;
bg.scrollFactor.set(0.9, 0.9); bg.scrollFactor.set(0.9, 0.9);
bg.active = false; bg.active = false;
add(bg); add(bg);
var stageFront:FlxSprite = new FlxSprite(-650, 600).loadGraphic(AssetPaths.stagefront__png);
stageFront.setGraphicSize(Std.int(stageFront.width * 1.1));
stageFront.updateHitbox();
stageFront.antialiasing = true;
stageFront.scrollFactor.set(0.9, 0.9);
stageFront.active = false;
add(stageFront);
var stageCurtains:FlxSprite = new FlxSprite(-500, -300).loadGraphic(AssetPaths.stagecurtains__png);
stageCurtains.setGraphicSize(Std.int(stageCurtains.width * 0.9));
stageCurtains.updateHitbox();
stageCurtains.antialiasing = true;
stageCurtains.scrollFactor.set(1.3, 1.3);
stageCurtains.active = false;
gf = new Girlfriend(400, 130); gf = new Girlfriend(400, 130);
gf.scrollFactor.set(0.95, 0.95); gf.scrollFactor.set(0.95, 0.95);
gf.antialiasing = true; gf.antialiasing = true;
add(gf); add(gf);
dad = new Dad(100, 100); dad = new Dad(100, 100);
add(dad); add(dad);
boyfriend = new Boyfriend(770, 450); boyfriend = new Boyfriend(770, 450);
add(boyfriend); add(boyfriend);
add(stageCurtains);
strumLine = new FlxSprite(0, 50).makeGraphic(FlxG.width, 10); strumLine = new FlxSprite(0, 50).makeGraphic(FlxG.width, 10);
strumLine.scrollFactor.set(); strumLine.scrollFactor.set();
@ -373,7 +389,7 @@ class PlayState extends FlxTransitionableState
{ {
super.update(elapsed); super.update(elapsed);
healthHeads.setGraphicSize(Std.int(FlxMath.lerp(healthHeads.width, 80, 0.02))); healthHeads.setGraphicSize(Std.int(FlxMath.lerp(100, healthHeads.width, 0.98)));
healthHeads.x = healthBar.x + (healthBar.width * (FlxMath.remapToRange(healthBar.percent, 0, 100, 100, 0) * 0.01)) - (healthHeads.width / 2); healthHeads.x = healthBar.x + (healthBar.width * (FlxMath.remapToRange(healthBar.percent, 0, 100, 100, 0) * 0.01)) - (healthHeads.width / 2);
if (FlxG.keys.justPressed.NINE) if (FlxG.keys.justPressed.NINE)