basically down scroll

This commit is contained in:
Cameron Taylor 2021-03-30 15:10:15 -07:00
parent 5b2412cf6f
commit b6e8cc93b8
3 changed files with 24 additions and 3 deletions

View File

@ -7,6 +7,7 @@ import flixel.math.FlxMath;
import flixel.util.FlxColor;
import flixel.util.FlxTimer;
import shaderslmfao.ColorSwap;
import ui.PreferencesMenu;
using StringTools;
@ -144,6 +145,9 @@ class Note extends FlxSprite
noteScore * 0.2;
alpha = 0.6;
if (PreferencesMenu.getPref('downscroll'))
angle = 180;
x += width / 2;
switch (noteData)

View File

@ -708,6 +708,12 @@ class PlayState extends MusicBeatState
Conductor.songPosition = -5000;
strumLine = new FlxSprite(0, 50).makeGraphic(FlxG.width, 10);
if (PreferencesMenu.getPref('downscroll'))
{
strumLine.y = FlxG.height - 150; // 150 just random ass number lol
}
strumLine.scrollFactor.set();
strumLineNotes = new FlxTypedGroup<FlxSprite>();
@ -747,6 +753,9 @@ class PlayState extends MusicBeatState
healthBarBG.scrollFactor.set();
add(healthBarBG);
if (PreferencesMenu.getPref('downscroll'))
healthBarBG.y = FlxG.height * 0.1;
healthBar = new FlxBar(healthBarBG.x + 4, healthBarBG.y + 4, RIGHT_TO_LEFT, Std.int(healthBarBG.width - 8), Std.int(healthBarBG.height - 8), this,
'health', 0, 2);
healthBar.scrollFactor.set();
@ -1638,7 +1647,10 @@ class PlayState extends MusicBeatState
daNote.active = true;
}
daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(SONG.speed, 2)));
if (PreferencesMenu.getPref('downscroll'))
daNote.y = (strumLine.y + (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(SONG.speed, 2)));
else
daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(SONG.speed, 2)));
// i am so fucking sorry for this if condition
if (daNote.isSustainNote
@ -1690,7 +1702,12 @@ class PlayState extends MusicBeatState
// WIP interpolation shit? Need to fix the pause issue
// daNote.y = (strumLine.y - (songTime - daNote.strumTime) * (0.45 * PlayState.SONG.speed));
if (daNote.y < -daNote.height)
var noteMiss:Bool = daNote.y < -daNote.height;
if (PreferencesMenu.getPref('downscroll'))
noteMiss = daNote.y > FlxG.height;
if (noteMiss)
{
if (daNote.tooLate || !daNote.wasGoodHit)
{

View File

@ -34,7 +34,7 @@ class PreferencesMenu extends ui.OptionsState.Page
public static function initPrefs():Void
{
preferenceCheck('censor-naughty', false);
preferenceCheck('downscroll', false);
preferenceCheck('downscroll', true);
preferenceCheck('flashing-menu', true);
preferenceCheck('camera-zoom', true);
}