fixed a lot of stuff here
This commit is contained in:
parent
a99ed98654
commit
2fc06c37d4
@ -124,7 +124,7 @@ class Character extends FlxSprite
|
||||
|
||||
case 'dad':
|
||||
// DAD ANIMATION LOADING CODE
|
||||
tex = Paths.getSparrowAtlas('characters/DADDY_DEAREST');
|
||||
tex = Paths.getSparrowAtlas('characters/DADDY_DEAREST', 'shared');
|
||||
frames = tex;
|
||||
animation.addByPrefix('idle', 'Dad idle dance', 24);
|
||||
animation.addByPrefix('singUP', 'Dad Sing Note UP', 24);
|
||||
@ -267,8 +267,11 @@ class Character extends FlxSprite
|
||||
flipX = true;
|
||||
|
||||
case 'bf':
|
||||
var tex = Paths.getSparrowAtlas('characters/BOYFRIEND');
|
||||
var tex = Paths.getSparrowAtlas('characters/BOYFRIEND', 'shared');
|
||||
frames = tex;
|
||||
|
||||
trace(tex.frames.length);
|
||||
|
||||
animation.addByPrefix('idle', 'BF idle dance', 24, false);
|
||||
animation.addByPrefix('singUP', 'BF NOTE UP0', 24, false);
|
||||
animation.addByPrefix('singLEFT', 'BF NOTE LEFT0', 24, false);
|
||||
|
@ -1,3 +1,7 @@
|
||||
import flixel.tweens.FlxEase;
|
||||
import flixel.tweens.FlxTween;
|
||||
import flixel.util.FlxColor;
|
||||
import flixel.text.FlxText;
|
||||
import flixel.math.FlxMath;
|
||||
import flixel.FlxCamera;
|
||||
import flixel.math.FlxPoint;
|
||||
@ -18,11 +22,14 @@ class GameplayCustomizeState extends MusicBeatState
|
||||
var defaultX:Float = FlxG.width * 0.55 - 135;
|
||||
var defaultY:Float = FlxG.height / 2 - 50;
|
||||
|
||||
var background:FlxSprite = new FlxSprite(-600, -200).loadGraphic(Paths.image('stageback','shared'));
|
||||
var curt:FlxSprite = new FlxSprite(-500, -300).loadGraphic(Paths.image('stagecurtains','shared'));
|
||||
var front:FlxSprite = new FlxSprite(-650, 600).loadGraphic(Paths.image('stagefront','shared'));
|
||||
var background:FlxSprite;
|
||||
var curt:FlxSprite;
|
||||
var front:FlxSprite;
|
||||
|
||||
var sick:FlxSprite = new FlxSprite().loadGraphic(Paths.image('sick','shared'));
|
||||
var sick:FlxSprite;
|
||||
|
||||
var text:FlxText;
|
||||
var blackBorder:FlxSprite;
|
||||
|
||||
var bf:Boyfriend;
|
||||
var dad:Character;
|
||||
@ -38,6 +45,12 @@ class GameplayCustomizeState extends MusicBeatState
|
||||
DiscordClient.changePresence("Customizing Gameplay", null);
|
||||
#end
|
||||
|
||||
sick = new FlxSprite().loadGraphic(Paths.image('sick','shared'));
|
||||
sick.scrollFactor.set();
|
||||
background = new FlxSprite(-600, -200).loadGraphic(Paths.image('stageback','shared'));
|
||||
curt = new FlxSprite(-500, -300).loadGraphic(Paths.image('stagecurtains','shared'));
|
||||
front = new FlxSprite(-650, 600).loadGraphic(Paths.image('stagefront','shared'));
|
||||
|
||||
Conductor.changeBPM(102);
|
||||
persistentUpdate = true;
|
||||
|
||||
@ -77,8 +90,11 @@ class GameplayCustomizeState extends MusicBeatState
|
||||
FlxG.camera.zoom = 0.9;
|
||||
FlxG.camera.focusOn(camFollow.getPosition());
|
||||
|
||||
strumLine = new FlxSprite(0, 25).makeGraphic(FlxG.width, 10);
|
||||
strumLine = new FlxSprite(0, FlxG.save.data.strumline).makeGraphic(FlxG.width, 14);
|
||||
strumLine.scrollFactor.set();
|
||||
strumLine.alpha = 0.4;
|
||||
|
||||
add(strumLine);
|
||||
|
||||
if (FlxG.save.data.downscroll)
|
||||
strumLine.y = FlxG.height - 165;
|
||||
@ -95,7 +111,20 @@ class GameplayCustomizeState extends MusicBeatState
|
||||
generateStaticArrows(0);
|
||||
generateStaticArrows(1);
|
||||
|
||||
text = new FlxText(5, FlxG.height + 40, 0, "Drag around gameplay elements, R to reset, Escape to go back.", 12);
|
||||
text.scrollFactor.set();
|
||||
text.setFormat("VCR OSD Mono", 16, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
|
||||
|
||||
blackBorder = new FlxSprite(-30,FlxG.height + 40).makeGraphic((Std.int(text.width + 900)),Std.int(text.height + 600),FlxColor.BLACK);
|
||||
blackBorder.alpha = 0.5;
|
||||
|
||||
add(blackBorder);
|
||||
|
||||
add(text);
|
||||
|
||||
FlxTween.tween(text,{y: FlxG.height - 18},2,{ease: FlxEase.elasticInOut});
|
||||
FlxTween.tween(blackBorder,{y: FlxG.height - 18},2, {ease: FlxEase.elasticInOut});
|
||||
|
||||
if (!FlxG.save.data.changedHit)
|
||||
{
|
||||
FlxG.save.data.changedHitX = defaultX;
|
||||
@ -105,7 +134,6 @@ class GameplayCustomizeState extends MusicBeatState
|
||||
sick.x = FlxG.save.data.changedHitX;
|
||||
sick.y = FlxG.save.data.changedHitY;
|
||||
|
||||
sick.updateHitbox();
|
||||
|
||||
FlxG.mouse.visible = true;
|
||||
|
||||
@ -123,9 +151,14 @@ class GameplayCustomizeState extends MusicBeatState
|
||||
if (FlxG.mouse.overlaps(sick) && FlxG.mouse.pressed)
|
||||
{
|
||||
sick.x = FlxG.mouse.x - sick.width / 2;
|
||||
sick.y = FlxG.mouse.y - sick.height / 2;
|
||||
sick.y = FlxG.mouse.y - sick.height;
|
||||
}
|
||||
|
||||
for (i in playerStrums)
|
||||
i.y = strumLine.y;
|
||||
for (i in strumLineNotes)
|
||||
i.y = strumLine.y;
|
||||
|
||||
if (FlxG.mouse.overlaps(sick) && FlxG.mouse.justReleased)
|
||||
{
|
||||
FlxG.save.data.changedHitX = sick.x;
|
||||
@ -133,6 +166,15 @@ class GameplayCustomizeState extends MusicBeatState
|
||||
FlxG.save.data.changedHit = true;
|
||||
}
|
||||
|
||||
if (FlxG.keys.justPressed.R)
|
||||
{
|
||||
sick.x = defaultX;
|
||||
sick.y = defaultY;
|
||||
FlxG.save.data.changedHitX = sick.x;
|
||||
FlxG.save.data.changedHitY = sick.y;
|
||||
FlxG.save.data.changedHit = false;
|
||||
}
|
||||
|
||||
if (controls.BACK)
|
||||
{
|
||||
FlxG.mouse.visible = false;
|
||||
@ -201,9 +243,7 @@ class GameplayCustomizeState extends MusicBeatState
|
||||
babyArrow.ID = i;
|
||||
|
||||
if (player == 1)
|
||||
{
|
||||
playerStrums.add(babyArrow);
|
||||
}
|
||||
|
||||
babyArrow.animation.play('static');
|
||||
babyArrow.x += 50;
|
||||
|
@ -75,6 +75,12 @@ class KadeEngineData
|
||||
if (FlxG.save.data.cpuStrums == null)
|
||||
FlxG.save.data.cpuStrums = false;
|
||||
|
||||
if (FlxG.save.data.strumline == null)
|
||||
FlxG.save.data.strumline = false;
|
||||
|
||||
if (FlxG.save.data.customStrumLine == null)
|
||||
FlxG.save.data.customStrumLine = 0;
|
||||
|
||||
Conductor.recalculateTimings();
|
||||
PlayerSettings.player1.controls.loadKeyBinds();
|
||||
KeyBinds.keyCheck();
|
||||
|
Loading…
x
Reference in New Issue
Block a user