damn the it
Kade dev fixes shit the i dont fucking knowth time
This commit is contained in:
commit
51a7e6b85b
@ -124,7 +124,7 @@ class Character extends FlxSprite
|
||||
|
||||
case 'dad':
|
||||
// DAD ANIMATION LOADING CODE
|
||||
tex = Paths.getSparrowAtlas('DADDY_DEAREST');
|
||||
tex = Paths.getSparrowAtlas('DADDY_DEAREST','shared');
|
||||
frames = tex;
|
||||
animation.addByPrefix('idle', 'Dad idle dance', 24);
|
||||
animation.addByPrefix('singUP', 'Dad Sing Note UP', 24);
|
||||
@ -267,7 +267,7 @@ class Character extends FlxSprite
|
||||
flipX = true;
|
||||
|
||||
case 'bf':
|
||||
var tex = Paths.getSparrowAtlas('BOYFRIEND');
|
||||
var tex = Paths.getSparrowAtlas('BOYFRIEND','shared');
|
||||
frames = tex;
|
||||
animation.addByPrefix('idle', 'BF idle dance', 24, false);
|
||||
animation.addByPrefix('singUP', 'BF NOTE UP0', 24, false);
|
||||
|
176
source/GameplayCustomizeState.hx
Normal file
176
source/GameplayCustomizeState.hx
Normal file
@ -0,0 +1,176 @@
|
||||
import flixel.math.FlxPoint;
|
||||
import flixel.FlxObject;
|
||||
#if desktop
|
||||
import Discord.DiscordClient;
|
||||
import sys.thread.Thread;
|
||||
#end
|
||||
|
||||
import flixel.group.FlxGroup.FlxTypedGroup;
|
||||
import openfl.ui.Keyboard;
|
||||
import flixel.FlxSprite;
|
||||
import flixel.FlxG;
|
||||
|
||||
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 sick:FlxSprite = new FlxSprite().loadGraphic(Paths.image('sick','shared'));
|
||||
|
||||
var bf:Boyfriend = new Boyfriend(770, 450, 'bf');
|
||||
var dad:Character;
|
||||
|
||||
var strumLine:FlxSprite;
|
||||
var strumLineNotes:FlxTypedGroup<FlxSprite>;
|
||||
var playerStrums:FlxTypedGroup<FlxSprite>;
|
||||
|
||||
override function create() {
|
||||
#if desktop
|
||||
// Updating Discord Rich Presence
|
||||
DiscordClient.changePresence("Customizing Gameplay", null);
|
||||
#end
|
||||
|
||||
background.scrollFactor.set(0.9,0.9);
|
||||
curt.scrollFactor.set(0.9,0.9);
|
||||
front.scrollFactor.set(0.9,0.9);
|
||||
|
||||
add(background);
|
||||
add(front);
|
||||
add(curt);
|
||||
|
||||
|
||||
add(sick);
|
||||
|
||||
bf.playAnim('idle');
|
||||
|
||||
var camFollow = new FlxObject(0, 0, 1, 1);
|
||||
|
||||
dad = new Character(100, 100, 'dad');
|
||||
|
||||
var camPos:FlxPoint = new FlxPoint(dad.getGraphicMidpoint().x + 400, dad.getGraphicMidpoint().y);
|
||||
|
||||
camFollow.setPosition(camPos.x, camPos.y);
|
||||
|
||||
add(bf);
|
||||
add(dad);
|
||||
|
||||
add(camFollow);
|
||||
|
||||
FlxG.camera.follow(camFollow, LOCKON, 0.01);
|
||||
// FlxG.camera.setScrollBounds(0, FlxG.width, 0, FlxG.height);
|
||||
FlxG.camera.zoom = 0.9;
|
||||
FlxG.camera.focusOn(camFollow.getPosition());
|
||||
|
||||
strumLine = new FlxSprite(0, 25).makeGraphic(FlxG.width, 10);
|
||||
strumLine.scrollFactor.set();
|
||||
|
||||
if (FlxG.save.data.downscroll)
|
||||
strumLine.y = FlxG.height - 165;
|
||||
|
||||
strumLineNotes = new FlxTypedGroup<FlxSprite>();
|
||||
add(strumLineNotes);
|
||||
|
||||
playerStrums = new FlxTypedGroup<FlxSprite>();
|
||||
|
||||
generateStaticArrows(0);
|
||||
generateStaticArrows(1);
|
||||
|
||||
if (!FlxG.save.data.changedHit)
|
||||
{
|
||||
FlxG.save.data.changedHitX = defaultX;
|
||||
FlxG.save.data.changedHitY = defaultY;
|
||||
}
|
||||
|
||||
sick.x = FlxG.save.data.changedHitX;
|
||||
sick.y = FlxG.save.data.changedHitY;
|
||||
|
||||
FlxG.mouse.visible = true;
|
||||
}
|
||||
|
||||
override function update(elapsed:Float) {
|
||||
bf.playAnim('idle');
|
||||
dad.dance();
|
||||
|
||||
if (FlxG.mouse.overlaps(sick) && FlxG.mouse.pressed)
|
||||
{
|
||||
sick.x = FlxG.mouse.x - sick.width / 2;
|
||||
sick.y = FlxG.mouse.y - sick.height / 2;
|
||||
}
|
||||
|
||||
if (FlxG.mouse.overlaps(sick) && FlxG.mouse.justReleased)
|
||||
{
|
||||
FlxG.save.data.changedHitX = sick.x;
|
||||
FlxG.save.data.changedHitY = sick.y;
|
||||
FlxG.save.data.changedHit = true;
|
||||
}
|
||||
|
||||
if (controls.BACK)
|
||||
{
|
||||
FlxG.mouse.visible = false;
|
||||
FlxG.sound.play(Paths.sound('cancelMenu'));
|
||||
FlxG.switchState(new OptionsMenu());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ripped from play state cuz im lazy
|
||||
|
||||
private function generateStaticArrows(player:Int):Void
|
||||
{
|
||||
for (i in 0...4)
|
||||
{
|
||||
// FlxG.log.add(i);
|
||||
var babyArrow:FlxSprite = new FlxSprite(0, strumLine.y);
|
||||
babyArrow.frames = Paths.getSparrowAtlas('NOTE_assets', 'shared');
|
||||
babyArrow.animation.addByPrefix('green', 'arrowUP');
|
||||
babyArrow.animation.addByPrefix('blue', 'arrowDOWN');
|
||||
babyArrow.animation.addByPrefix('purple', 'arrowLEFT');
|
||||
babyArrow.animation.addByPrefix('red', 'arrowRIGHT');
|
||||
babyArrow.antialiasing = true;
|
||||
babyArrow.setGraphicSize(Std.int(babyArrow.width * 0.7));
|
||||
switch (Math.abs(i))
|
||||
{
|
||||
case 0:
|
||||
babyArrow.x += Note.swagWidth * 0;
|
||||
babyArrow.animation.addByPrefix('static', 'arrowLEFT');
|
||||
babyArrow.animation.addByPrefix('pressed', 'left press', 24, false);
|
||||
babyArrow.animation.addByPrefix('confirm', 'left confirm', 24, false);
|
||||
case 1:
|
||||
babyArrow.x += Note.swagWidth * 1;
|
||||
babyArrow.animation.addByPrefix('static', 'arrowDOWN');
|
||||
babyArrow.animation.addByPrefix('pressed', 'down press', 24, false);
|
||||
babyArrow.animation.addByPrefix('confirm', 'down confirm', 24, false);
|
||||
case 2:
|
||||
babyArrow.x += Note.swagWidth * 2;
|
||||
babyArrow.animation.addByPrefix('static', 'arrowUP');
|
||||
babyArrow.animation.addByPrefix('pressed', 'up press', 24, false);
|
||||
babyArrow.animation.addByPrefix('confirm', 'up confirm', 24, false);
|
||||
case 3:
|
||||
babyArrow.x += Note.swagWidth * 3;
|
||||
babyArrow.animation.addByPrefix('static', 'arrowRIGHT');
|
||||
babyArrow.animation.addByPrefix('pressed', 'right press', 24, false);
|
||||
babyArrow.animation.addByPrefix('confirm', 'right confirm', 24, false);
|
||||
}
|
||||
babyArrow.updateHitbox();
|
||||
babyArrow.scrollFactor.set();
|
||||
|
||||
babyArrow.ID = i;
|
||||
|
||||
if (player == 1)
|
||||
{
|
||||
playerStrums.add(babyArrow);
|
||||
}
|
||||
|
||||
babyArrow.animation.play('static');
|
||||
babyArrow.x += 50;
|
||||
babyArrow.x += ((FlxG.width / 2) * player);
|
||||
|
||||
strumLineNotes.add(babyArrow);
|
||||
}
|
||||
}
|
||||
}
|
@ -12,6 +12,7 @@ class HealthIcon extends FlxSprite
|
||||
public function new(char:String = 'bf', isPlayer:Bool = false)
|
||||
{
|
||||
super();
|
||||
trace(Paths.image('iconGrid','data'));
|
||||
loadGraphic(Paths.image('iconGrid'), true, 150, 150);
|
||||
|
||||
antialiasing = true;
|
||||
|
@ -30,5 +30,12 @@ class KadeEngineData
|
||||
|
||||
if (FlxG.save.data.fps == null)
|
||||
FlxG.save.data.fps = false;
|
||||
|
||||
if (FlxG.save.data.changedHit == null)
|
||||
{
|
||||
FlxG.save.data.changedHitX = -1;
|
||||
FlxG.save.data.changedHitY = -1;
|
||||
FlxG.save.data.changedHit = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -33,6 +33,8 @@ class Note extends FlxSprite
|
||||
public static var BLUE_NOTE:Int = 1;
|
||||
public static var RED_NOTE:Int = 3;
|
||||
|
||||
public var rating:String = "shit";
|
||||
|
||||
public function new(strumTime:Float, noteData:Int, ?prevNote:Note, ?sustainNote:Bool = false)
|
||||
{
|
||||
super();
|
||||
@ -40,9 +42,6 @@ class Note extends FlxSprite
|
||||
if (prevNote == null)
|
||||
prevNote = this;
|
||||
|
||||
if (FlxG.save.data.downscroll)
|
||||
flipY = true;
|
||||
|
||||
this.prevNote = prevNote;
|
||||
isSustainNote = sustainNote;
|
||||
|
||||
@ -74,18 +73,10 @@ class Note extends FlxSprite
|
||||
{
|
||||
loadGraphic(Paths.image('weeb/pixelUI/arrowEnds'), true, 7, 6);
|
||||
|
||||
if(!FlxG.save.data.downscroll)
|
||||
{
|
||||
animation.add('purpleholdend', [4]);
|
||||
animation.add('greenholdend', [6]);
|
||||
animation.add('redholdend', [7]);
|
||||
animation.add('blueholdend', [5]);
|
||||
}else {
|
||||
animation.add('purpleholdend', [4], 0, false, false, true);
|
||||
animation.add('greenholdend', [6], 0, false, false, true);
|
||||
animation.add('redholdend', [7], 0, false, false, true);
|
||||
animation.add('blueholdend', [5], 0, false, false, true);
|
||||
}
|
||||
}
|
||||
|
||||
setGraphicSize(Std.int(width * PlayState.daPixelZoom));
|
||||
@ -104,18 +95,10 @@ class Note extends FlxSprite
|
||||
animation.addByPrefix('redhold', 'red hold piece');
|
||||
animation.addByPrefix('bluehold', 'blue hold piece');
|
||||
|
||||
if(!FlxG.save.data.downscroll)
|
||||
{
|
||||
animation.addByPrefix('purpleholdend', 'pruple end hold');
|
||||
animation.addByPrefix('greenholdend', 'green hold end');
|
||||
animation.addByPrefix('redholdend', 'red hold end');
|
||||
animation.addByPrefix('blueholdend', 'blue hold end');
|
||||
}else {
|
||||
animation.addByPrefix('purpleholdend', 'pruple end hold', 0, false, false, true);
|
||||
animation.addByPrefix('greenholdend', 'green hold end', 0, false, false, true);
|
||||
animation.addByPrefix('redholdend', 'red hold end', 0, false, false, true);
|
||||
animation.addByPrefix('blueholdend', 'blue hold end', 0, false, false, true);
|
||||
}
|
||||
|
||||
setGraphicSize(Std.int(width * 0.7));
|
||||
updateHitbox();
|
||||
@ -138,6 +121,11 @@ class Note extends FlxSprite
|
||||
animation.play('redScroll');
|
||||
}
|
||||
|
||||
// we make sure its downscroll and its a SUSTAIN NOTE (aka a trail, not a note)
|
||||
// and flip it so it doesn't look weird.
|
||||
// THIS DOESN'T FUCKING FLIP THE NOTE, CONTRIBUTERS DON'T JUST COMMENT THIS OUT JESUS
|
||||
if (FlxG.save.data.downscroll && sustainNote)
|
||||
flipY = true;
|
||||
|
||||
if (isSustainNote && prevNote != null)
|
||||
{
|
||||
@ -192,15 +180,38 @@ class Note extends FlxSprite
|
||||
|
||||
if (mustPress)
|
||||
{
|
||||
// The * 0.5 is so that it's easier to hit them too late, instead of too early
|
||||
if (strumTime > Conductor.songPosition - Conductor.safeZoneOffset
|
||||
&& strumTime < Conductor.songPosition + (Conductor.safeZoneOffset * 0.5))
|
||||
&& strumTime < Conductor.songPosition + Conductor.safeZoneOffset)
|
||||
canBeHit = true;
|
||||
else
|
||||
canBeHit = false;
|
||||
|
||||
if (strumTime < Conductor.songPosition - Conductor.safeZoneOffset && !wasGoodHit)
|
||||
var noteDiff:Float = Math.abs(strumTime - Conductor.songPosition);
|
||||
|
||||
if (canBeHit)
|
||||
{
|
||||
if (noteDiff > Conductor.safeZoneOffset * 0.95)
|
||||
rating = "shit";
|
||||
else if (noteDiff < Conductor.safeZoneOffset * -0.95)
|
||||
rating = "shit";
|
||||
else if (noteDiff > Conductor.safeZoneOffset * 0.70)
|
||||
rating = "bad";
|
||||
else if (noteDiff < Conductor.safeZoneOffset * -0.75)
|
||||
rating = "bad";
|
||||
else if (noteDiff > Conductor.safeZoneOffset * 0.45)
|
||||
rating = "good";
|
||||
else if (noteDiff < Conductor.safeZoneOffset * -0.45)
|
||||
rating = "good";
|
||||
else
|
||||
rating = "sick";
|
||||
FlxG.watch.addQuick("Note " + this.ID,rating);
|
||||
}
|
||||
|
||||
if (strumTime < Conductor.songPosition - (Conductor.safeZoneOffset * 0.80) && !wasGoodHit)
|
||||
{
|
||||
tooLate = true;
|
||||
rating = "shit";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -52,21 +52,6 @@ class DFJKOption extends Option
|
||||
}
|
||||
}
|
||||
|
||||
class NewInputOption extends Option
|
||||
{
|
||||
public override function press():Bool
|
||||
{
|
||||
FlxG.save.data.newInput = !FlxG.save.data.newInput;
|
||||
display = updateDisplay();
|
||||
return true;
|
||||
}
|
||||
|
||||
private override function updateDisplay():String
|
||||
{
|
||||
return FlxG.save.data.newInput ? "New input" : "Old Input";
|
||||
}
|
||||
}
|
||||
|
||||
class DownscrollOption extends Option
|
||||
{
|
||||
public override function press():Bool
|
||||
@ -157,3 +142,19 @@ class ReplayOption extends Option
|
||||
return "Load replays";
|
||||
}
|
||||
}
|
||||
|
||||
class CustomizeGameplay extends Option
|
||||
{
|
||||
public override function press():Bool
|
||||
{
|
||||
trace("switch");
|
||||
FlxG.switchState(new GameplayCustomizeState());
|
||||
return false;
|
||||
}
|
||||
|
||||
private override function updateDisplay():String
|
||||
{
|
||||
return "Customize Gameplay";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,6 @@ class OptionsMenu extends MusicBeatState
|
||||
|
||||
var options:Array<Option> = [
|
||||
new DFJKOption(controls),
|
||||
new NewInputOption(),
|
||||
new DownscrollOption(),
|
||||
new AccuracyOption(),
|
||||
new SongPositionOption(),
|
||||
@ -28,6 +27,7 @@ class OptionsMenu extends MusicBeatState
|
||||
new FPSOption(),
|
||||
#end
|
||||
new EtternaModeOption(),
|
||||
new CustomizeGameplay(),
|
||||
new ReplayOption()
|
||||
];
|
||||
|
||||
|
@ -173,7 +173,6 @@ class PlayState extends MusicBeatState
|
||||
Conductor.safeFrames = 10; // 166ms hit window (j1)
|
||||
|
||||
|
||||
theFunne = FlxG.save.data.newInput;
|
||||
if (FlxG.sound.music != null)
|
||||
FlxG.sound.music.stop();
|
||||
|
||||
@ -1480,12 +1479,12 @@ class PlayState extends MusicBeatState
|
||||
ranking = "(GFC)";
|
||||
else if ((shits < 10 && shits != 0 || bads < 10 && bads != 0) && misses == 0) // Single Digit Combo Breaks
|
||||
ranking = "(SDCB)";
|
||||
else if (misses == 0 && (shits >= 10 || bads >= 10)) // Regular FC
|
||||
else if (misses == 0 && (shits >= 10)) // Regular FC
|
||||
ranking = "(FC)";
|
||||
else if (misses >= 10 || (shits >= 10 || bads >= 10)) // Combo Breaks
|
||||
else if (misses >= 10 || (shits >= 10)) // Combo Breaks
|
||||
ranking = "(CB)";
|
||||
else
|
||||
ranking = "";
|
||||
ranking = "(Clear)";
|
||||
|
||||
// WIFE TIME :)))) (based on Wife3)
|
||||
|
||||
@ -2010,14 +2009,15 @@ class PlayState extends MusicBeatState
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var endingSong:Bool = false;
|
||||
|
||||
var timeShown = 0;
|
||||
var currentTimingShown:FlxText = null;
|
||||
|
||||
private function popUpScore(strumtime:Float):Void
|
||||
private function popUpScore(daNote:Note):Void
|
||||
{
|
||||
var noteDiff:Float = Math.abs(strumtime - Conductor.songPosition);
|
||||
var noteDiff:Float = Math.abs(daNote.strumTime - Conductor.songPosition);
|
||||
var wife:Float = EtternaFunctions.wife3(noteDiff, FlxG.save.data.etternaMode ? 1 : 1.7);
|
||||
// boyfriend.playAnim('hey');
|
||||
vocals.volume = 1;
|
||||
@ -2034,100 +2034,38 @@ class PlayState extends MusicBeatState
|
||||
var rating:FlxSprite = new FlxSprite();
|
||||
var score:Float = 350;
|
||||
|
||||
var daRating:String = "sick";
|
||||
|
||||
totalNotesHit += wife;
|
||||
|
||||
if (noteDiff > Conductor.safeZoneOffset * 2)
|
||||
var daRating = daNote.rating;
|
||||
|
||||
switch(daRating)
|
||||
{
|
||||
daRating = 'shit';
|
||||
ss = false;
|
||||
if (theFunne)
|
||||
{
|
||||
score = -3000;
|
||||
case 'shit':
|
||||
score = -300;
|
||||
combo = 0;
|
||||
misses++;
|
||||
health -= 0.2;
|
||||
}
|
||||
shits++;
|
||||
}
|
||||
else if (noteDiff < Conductor.safeZoneOffset * -2)
|
||||
{
|
||||
daRating = 'shit';
|
||||
if (theFunne)
|
||||
{
|
||||
score = -3000;
|
||||
combo = 0;
|
||||
misses++;
|
||||
health -= 0.2;
|
||||
}
|
||||
ss = false;
|
||||
shits++;
|
||||
}
|
||||
else if (noteDiff < Conductor.safeZoneOffset * -0.45)
|
||||
{
|
||||
case 'bad':
|
||||
daRating = 'bad';
|
||||
if (theFunne)
|
||||
{
|
||||
score = -1000;
|
||||
health -= 0.03;
|
||||
misses++;
|
||||
combo = 0;
|
||||
}
|
||||
else
|
||||
score = 100;
|
||||
score = 0;
|
||||
health -= 0.06;
|
||||
ss = false;
|
||||
bads++;
|
||||
}
|
||||
else if (noteDiff > Conductor.safeZoneOffset * 0.45)
|
||||
{
|
||||
daRating = 'bad';
|
||||
if (theFunne)
|
||||
{
|
||||
score = -1000;
|
||||
health -= 0.03;
|
||||
combo = 0;
|
||||
misses++;
|
||||
}
|
||||
else
|
||||
score = 100;
|
||||
ss = false;
|
||||
bads++;
|
||||
}
|
||||
else if (noteDiff < Conductor.safeZoneOffset * -0.25)
|
||||
{
|
||||
case 'good':
|
||||
daRating = 'good';
|
||||
if (theFunne)
|
||||
{
|
||||
score = 200;
|
||||
//health -= 0.01;
|
||||
}
|
||||
else
|
||||
score = 200;
|
||||
ss = false;
|
||||
goods++;
|
||||
}
|
||||
else if (noteDiff > Conductor.safeZoneOffset * 0.35)
|
||||
{
|
||||
daRating = 'good';
|
||||
if (theFunne)
|
||||
{
|
||||
score = 200;
|
||||
//health -= 0.01;
|
||||
}
|
||||
else
|
||||
score = 200;
|
||||
ss = false;
|
||||
goods++;
|
||||
}
|
||||
if (daRating == 'sick')
|
||||
{
|
||||
if (health < 2)
|
||||
health += 0.04;
|
||||
case 'sick':
|
||||
if (health < 2)
|
||||
health += 0.1;
|
||||
sicks++;
|
||||
}
|
||||
|
||||
|
||||
if (FlxG.save.data.etternaMode)
|
||||
etternaModeScore += Math.round(score / wife);
|
||||
|
||||
@ -2160,6 +2098,12 @@ class PlayState extends MusicBeatState
|
||||
rating.screenCenter();
|
||||
rating.y -= 50;
|
||||
rating.x = coolText.x - 125;
|
||||
|
||||
if (FlxG.save.data.changedHit)
|
||||
{
|
||||
rating.x = FlxG.save.data.changedHitX;
|
||||
rating.y = FlxG.save.data.changedHitY;
|
||||
}
|
||||
rating.acceleration.y = 550;
|
||||
rating.velocity.y -= FlxG.random.int(140, 175);
|
||||
rating.velocity.x -= FlxG.random.int(0, 10);
|
||||
@ -2798,7 +2742,12 @@ class PlayState extends MusicBeatState
|
||||
}
|
||||
else
|
||||
{
|
||||
playerStrums.members[note.noteData].animation.play('static');
|
||||
// this is bad but fuck you
|
||||
playerStrums.members[0].animation.play('static');
|
||||
playerStrums.members[1].animation.play('static');
|
||||
playerStrums.members[2].animation.play('static');
|
||||
playerStrums.members[3].animation.play('static');
|
||||
health -= 0.2;
|
||||
trace('mash ' + mashing);
|
||||
}
|
||||
|
||||
@ -2817,7 +2766,7 @@ class PlayState extends MusicBeatState
|
||||
{
|
||||
if (!note.isSustainNote)
|
||||
{
|
||||
popUpScore(note.strumTime);
|
||||
popUpScore(note);
|
||||
combo += 1;
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user