why don't you pull some bitches

pull some bitches
This commit is contained in:
CyndaquilDAC 2021-03-30 22:55:11 -05:00 committed by GitHub
commit 97d4229d0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 842 additions and 450 deletions

View File

@ -224,8 +224,8 @@ class Alphabet extends FlxSpriteGroup
{
var scaledY = FlxMath.remapToRange(targetY, 0, 1, 0, 1.3);
y = FlxMath.lerp(y, (scaledY * 120) + (FlxG.height * 0.48), 0.16);
x = FlxMath.lerp(x, (targetY * 20) + 90, 0.16);
y = FlxMath.lerp(y, (scaledY * 120) + (FlxG.height * 0.48), 0.30);
x = FlxMath.lerp(x, (targetY * 20) + 90, 0.30);
}
super.update(elapsed);

View File

@ -1,3 +1,5 @@
import flixel.math.FlxMath;
import flixel.FlxCamera;
import flixel.math.FlxPoint;
import flixel.FlxObject;
#if desktop
@ -28,13 +30,23 @@ class GameplayCustomizeState extends MusicBeatState
var strumLine:FlxSprite;
var strumLineNotes:FlxTypedGroup<FlxSprite>;
var playerStrums:FlxTypedGroup<FlxSprite>;
private var camHUD:FlxCamera;
override function create() {
public override function create() {
#if desktop
// Updating Discord Rich Presence
DiscordClient.changePresence("Customizing Gameplay", null);
#end
Conductor.changeBPM(102);
persistentUpdate = true;
super.create();
camHUD = new FlxCamera();
camHUD.bgColor.alpha = 0;
FlxG.cameras.add(camHUD);
background.scrollFactor.set(0.9,0.9);
curt.scrollFactor.set(0.9,0.9);
front.scrollFactor.set(0.9,0.9);
@ -43,11 +55,6 @@ class GameplayCustomizeState extends MusicBeatState
add(front);
add(curt);
add(sick);
bf.playAnim('idle');
var camFollow = new FlxObject(0, 0, 1, 1);
dad = new Character(100, 100, 'dad');
@ -59,6 +66,8 @@ class GameplayCustomizeState extends MusicBeatState
add(bf);
add(dad);
add(sick);
add(camFollow);
FlxG.camera.follow(camFollow, LOCKON, 0.01);
@ -77,9 +86,14 @@ class GameplayCustomizeState extends MusicBeatState
playerStrums = new FlxTypedGroup<FlxSprite>();
sick.cameras = [camHUD];
strumLine.cameras = [camHUD];
playerStrums.cameras = [camHUD];
generateStaticArrows(0);
generateStaticArrows(1);
if (!FlxG.save.data.changedHit)
{
FlxG.save.data.changedHitX = defaultX;
@ -89,12 +103,20 @@ class GameplayCustomizeState extends MusicBeatState
sick.x = FlxG.save.data.changedHitX;
sick.y = FlxG.save.data.changedHitY;
sick.updateHitbox();
FlxG.mouse.visible = true;
}
override function update(elapsed:Float) {
bf.playAnim('idle');
dad.dance();
if (FlxG.sound.music != null)
Conductor.songPosition = FlxG.sound.music.time;
super.update(elapsed);
FlxG.camera.zoom = FlxMath.lerp(0.9, FlxG.camera.zoom, 0.95);
camHUD.zoom = FlxMath.lerp(1, camHUD.zoom, 0.95);
if (FlxG.mouse.overlaps(sick) && FlxG.mouse.pressed)
{
@ -115,6 +137,21 @@ class GameplayCustomizeState extends MusicBeatState
FlxG.sound.play(Paths.sound('cancelMenu'));
FlxG.switchState(new OptionsMenu());
}
}
override function beatHit()
{
super.beatHit();
bf.playAnim('idle');
dad.dance();
FlxG.camera.zoom += 0.015;
camHUD.zoom += 0.010;
trace('beat');
}

View File

@ -1,3 +1,4 @@
import openfl.Lib;
import flixel.FlxG;
class KadeEngineData
@ -37,5 +38,19 @@ class KadeEngineData
FlxG.save.data.changedHitY = -1;
FlxG.save.data.changedHit = false;
}
if (FlxG.save.data.fpsRain == null)
FlxG.save.data.fpsRain = false;
if (FlxG.save.data.fpsCap == null)
FlxG.save.data.fpsCap = 120;
if (FlxG.save.data.fpsCap > 285 || FlxG.save.data.fpsCap < 60)
FlxG.save.data.fpsCap = 120; // baby proof so you can't hard lock ur copy of kade engine
if (FlxG.save.data.scrollSpeed == null)
FlxG.save.data.scrollSpeed = 1;
(cast (Lib.current.getChildAt(0), Main)).setFPSCap(FlxG.save.data.fpsCap);
}
}

View File

@ -1,5 +1,9 @@
package;
import openfl.display.BlendMode;
import openfl.text.TextFormat;
import openfl.display.Application;
import flixel.util.FlxColor;
import flixel.FlxG;
import flixel.FlxGame;
import flixel.FlxState;
@ -68,7 +72,9 @@ class Main extends Sprite
initialState = TitleState;
#end
addChild(new FlxGame(gameWidth, gameHeight, initialState, zoom, framerate, framerate, skipSplash, startFullscreen));
game = new FlxGame(gameWidth, gameHeight, initialState, zoom, framerate, framerate, skipSplash, startFullscreen);
addChild(game);
#if !mobile
fpsCounter = new FPS(10, 3, 0xFFFFFF);
@ -77,9 +83,31 @@ class Main extends Sprite
#end
}
var game:FlxGame;
var fpsCounter:FPS;
public function toggleFPS(fpsEnabled:Bool):Void {
fpsCounter.visible = fpsEnabled;
}
public function changeFPSColor(color:FlxColor)
{
fpsCounter.textColor = color;
}
public function setFPSCap(cap:Float)
{
openfl.Lib.current.stage.frameRate = cap;
}
public function getFPSCap():Float
{
return openfl.Lib.current.stage.frameRate;
}
public function getFPS():Float
{
return fpsCounter.currentFPS;
}
}

View File

@ -36,7 +36,9 @@ class MainMenuState extends MusicBeatState
var newGaming2:FlxText;
var newInput:Bool = true;
public static var kadeEngineVer:String = "1.3.1";
public static var nightly:String = "-Nightly.2";
public static var kadeEngineVer:String = "1.3.1" + nightly;
public static var gameVer:String = "0.2.7.1";
var magenta:FlxSprite;
@ -99,7 +101,7 @@ class MainMenuState extends MusicBeatState
menuItem.antialiasing = true;
}
FlxG.camera.follow(camFollow, null, 0.06);
FlxG.camera.follow(camFollow, null, 0.60 * (60 / FlxG.save.data.fpsCap));
var versionShit:FlxText = new FlxText(5, FlxG.height - 18, 0, gameVer + " FNF - " + kadeEngineVer + " Kade Engine", 12);
versionShit.scrollFactor.set();

View File

@ -36,7 +36,7 @@ class MenuItem extends FlxSpriteGroup
override function update(elapsed:Float)
{
super.update(elapsed);
y = FlxMath.lerp(y, (targetY * 120) + 480, 0.17);
y = FlxMath.lerp(y, (targetY * 120) + 480, 0.17 * (60 / FlxG.save.data.fpsCap));
if (isFlashing)
flashingInt += 1;

View File

@ -1,5 +1,8 @@
package;
import flixel.tweens.FlxTween;
import flixel.util.FlxColor;
import openfl.Lib;
import Conductor.BPMChangeEvent;
import flixel.FlxG;
import flixel.addons.transition.FlxTransitionableState;
@ -27,6 +30,18 @@ class MusicBeatState extends FlxUIState
super.create();
}
var array:Array<FlxColor> = [
FlxColor.fromRGB(148, 0, 211),
FlxColor.fromRGB(75, 0, 130),
FlxColor.fromRGB(0, 0, 255),
FlxColor.fromRGB(0, 255, 0),
FlxColor.fromRGB(255, 255, 0),
FlxColor.fromRGB(255, 127, 0),
FlxColor.fromRGB(255, 0 , 0)
];
var skippedFrames = 0;
override function update(elapsed:Float)
{
//everyStep();
@ -38,6 +53,17 @@ class MusicBeatState extends FlxUIState
if (oldStep != curStep && curStep > 0)
stepHit();
if (FlxG.save.data.fpsRain && skippedFrames >= 6)
{
if (currentColor >= array.length)
currentColor = 0;
(cast (Lib.current.getChildAt(0), Main)).changeFPSColor(array[currentColor]);
currentColor++;
skippedFrames = 0;
}
else
skippedFrames++;
super.update(elapsed);
}
@ -46,6 +72,8 @@ class MusicBeatState extends FlxUIState
curBeat = Math.floor(curStep / 4);
}
public static var currentColor = 0;
private function updateCurStep():Void
{
var lastChange:BPMChangeEvent = {
@ -64,6 +92,7 @@ class MusicBeatState extends FlxUIState
public function stepHit():Void
{
if (curStep % 4 == 0)
beatHit();
}

View File

@ -64,11 +64,6 @@ class Note extends FlxSprite
animation.add('blueScroll', [5]);
animation.add('purpleScroll', [4]);
animation.add('purplehold', [0]);
animation.add('greenhold', [2]);
animation.add('redhold', [3]);
animation.add('bluehold', [1]);
if (isSustainNote)
{
loadGraphic(Paths.image('weeb/pixelUI/arrowEnds'), true, 7, 6);
@ -77,6 +72,11 @@ class Note extends FlxSprite
animation.add('greenholdend', [6]);
animation.add('redholdend', [7]);
animation.add('blueholdend', [5]);
animation.add('purplehold', [0]);
animation.add('greenhold', [2]);
animation.add('redhold', [3]);
animation.add('bluehold', [1]);
}
setGraphicSize(Std.int(width * PlayState.daPixelZoom));
@ -90,16 +90,16 @@ class Note extends FlxSprite
animation.addByPrefix('blueScroll', 'blue0');
animation.addByPrefix('purpleScroll', 'purple0');
animation.addByPrefix('purplehold', 'purple hold piece');
animation.addByPrefix('greenhold', 'green hold piece');
animation.addByPrefix('redhold', 'red hold piece');
animation.addByPrefix('bluehold', 'blue hold piece');
animation.addByPrefix('purpleholdend', 'pruple end hold');
animation.addByPrefix('greenholdend', 'green hold end');
animation.addByPrefix('redholdend', 'red hold end');
animation.addByPrefix('blueholdend', 'blue hold end');
animation.addByPrefix('purplehold', 'purple hold piece');
animation.addByPrefix('greenhold', 'green hold piece');
animation.addByPrefix('redhold', 'red hold piece');
animation.addByPrefix('bluehold', 'blue hold piece');
setGraphicSize(Std.int(width * 0.7));
updateHitbox();
antialiasing = true;
@ -127,6 +127,7 @@ class Note extends FlxSprite
if (FlxG.save.data.downscroll && sustainNote)
flipY = true;
if (isSustainNote && prevNote != null)
{
noteScore * 0.2;
@ -174,40 +175,23 @@ class Note extends FlxSprite
}
}
var oneTime:Bool = false;
override function update(elapsed:Float)
{
super.update(elapsed);
if (mustPress)
{
if (strumTime > Conductor.songPosition - Conductor.safeZoneOffset
&& strumTime < Conductor.songPosition + Conductor.safeZoneOffset)
if ((strumTime > Conductor.songPosition - Conductor.safeZoneOffset
&& strumTime < Conductor.songPosition + Conductor.safeZoneOffset))
{
canBeHit = true;
}
else
canBeHit = false;
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)
if (strumTime < Conductor.songPosition - Conductor.safeZoneOffset && !wasGoodHit)
{
tooLate = true;
rating = "shit";

View File

@ -1,23 +1,60 @@
package;
import flixel.util.FlxColor;
import Controls.KeyboardScheme;
import flixel.FlxG;
import openfl.display.FPS;
import openfl.Lib;
class OptionCatagory
{
private var _options:Array<Option> = new Array<Option>();
public final function getOptions():Array<Option>
{
return _options;
}
public final function addOption(opt:Option)
{
_options.push(opt);
}
public final function removeOption(opt:Option)
{
_options.remove(opt);
}
private var _name:String = "New Catagory";
public final function getName() {
return _name;
}
public function new (catName:String, options:Array<Option>)
{
_name = catName;
_options = options;
}
}
class Option
{
public function new()
{
display = updateDisplay();
}
private var description:String = "";
private var display:String;
public final function getDisplay():String
{
return display;
}
public final function getDescription():String
{
return description;
}
// Returns whether the label is to be updated.
public function press():Bool { return throw "stub!"; }
private function updateDisplay():String { return throw "stub!"; }
@ -54,6 +91,12 @@ class DFJKOption extends Option
class DownscrollOption extends Option
{
public function new(desc:String)
{
super();
description = desc;
}
public override function press():Bool
{
FlxG.save.data.downscroll = !FlxG.save.data.downscroll;
@ -69,6 +112,11 @@ class DownscrollOption extends Option
class AccuracyOption extends Option
{
public function new(desc:String)
{
super();
description = desc;
}
public override function press():Bool
{
FlxG.save.data.accuracyDisplay = !FlxG.save.data.accuracyDisplay;
@ -84,6 +132,11 @@ class AccuracyOption extends Option
class SongPositionOption extends Option
{
public function new(desc:String)
{
super();
description = desc;
}
public override function press():Bool
{
FlxG.save.data.songPosition = !FlxG.save.data.songPosition;
@ -99,6 +152,12 @@ class SongPositionOption extends Option
class EtternaModeOption extends Option
{
public function new(desc:String)
{
super();
description = desc;
}
public override function press():Bool
{
FlxG.save.data.etternaMode = !FlxG.save.data.etternaMode;
@ -114,6 +173,12 @@ class EtternaModeOption extends Option
class FPSOption extends Option
{
public function new(desc:String)
{
super();
description = desc;
}
public override function press():Bool
{
FlxG.save.data.fps = !FlxG.save.data.fps;
@ -128,8 +193,76 @@ class FPSOption extends Option
}
}
class FPSCapOption extends Option
{
public function new(desc:String)
{
super();
description = desc;
}
public override function press():Bool
{
return false;
}
private override function updateDisplay():String
{
return "FPS Cap";
}
}
class ScrollSpeedOption extends Option
{
public function new(desc:String)
{
super();
description = desc;
}
public override function press():Bool
{
return false;
}
private override function updateDisplay():String
{
return "Scroll Speed";
}
}
class RainbowFPSOption extends Option
{
public function new(desc:String)
{
super();
description = desc;
}
public override function press():Bool
{
FlxG.save.data.fpsRain = !FlxG.save.data.fpsRain;
(cast (Lib.current.getChildAt(0), Main)).changeFPSColor(FlxColor.WHITE);
display = updateDisplay();
return true;
}
private override function updateDisplay():String
{
return "FPS Rainbow " + (!FlxG.save.data.fpsRain ? "off" : "on");
}
}
class ReplayOption extends Option
{
public function new(desc:String)
{
super();
description = desc;
}
public override function press():Bool
{
trace("switch");
@ -145,6 +278,12 @@ class ReplayOption extends Option
class CustomizeGameplay extends Option
{
public function new(desc:String)
{
super();
description = desc;
}
public override function press():Bool
{
trace("switch");

View File

@ -1,5 +1,6 @@
package;
import openfl.Lib;
import Options;
import Controls.Control;
import flash.text.TextField;
@ -18,21 +19,34 @@ class OptionsMenu extends MusicBeatState
var selector:FlxText;
var curSelected:Int = 0;
var options:Array<Option> = [
var options:Array<OptionCatagory> = [
new OptionCatagory("Gameplay", [
new DFJKOption(controls),
new DownscrollOption(),
new AccuracyOption(),
new SongPositionOption(),
new FPSCapOption("Cap your FPS (Left for -10, Right for -10)"),
new CustomizeGameplay("Drag'n'Drop Gameplay Modules around to your preference"),
new ScrollSpeedOption("Change your scroll speed (Left for -0.1, right for +0.1. If its at 1, it will be chart dependent)")
]),
new OptionCatagory("Appearence", [
new SongPositionOption("Show the songs current position (as a bar)"),
new DownscrollOption("Change the layout of the strumline."),
new RainbowFPSOption("Make the FPS Counter Rainbow (Only works with the FPS Counter toggeled on)"),
new AccuracyOption("Display accuracy information.")
]),
new OptionCatagory("Misc", [
new EtternaModeOption("Harder Hit Windows and a different scoring system."),
#if !mobile
new FPSOption(),
new FPSOption("Toggle the FPS Counter"),
#end
new EtternaModeOption(),
new CustomizeGameplay(),
new ReplayOption()
new ReplayOption("View replays")
])
];
private var currentDescription:String = "";
private var grpControls:FlxTypedGroup<Alphabet>;
var versionShit:FlxText;
var currentSelectedCat:OptionCatagory;
override function create()
{
var menuBG:FlxSprite = new FlxSprite().loadGraphic(Paths.image("menuDesat"));
@ -49,15 +63,16 @@ class OptionsMenu extends MusicBeatState
for (i in 0...options.length)
{
var controlLabel:Alphabet = new Alphabet(0, (70 * i) + 30, options[i].getDisplay(), true, false);
var controlLabel:Alphabet = new Alphabet(0, (70 * i) + 30, options[i].getName(), true, false);
controlLabel.isMenuItem = true;
controlLabel.targetY = i;
grpControls.add(controlLabel);
// DONT PUT X IN THE FIRST PARAMETER OF new ALPHABET() !!
}
currentDescription = "none";
versionShit = new FlxText(5, FlxG.height - 18, 0, "Offset (Left, Right): " + FlxG.save.data.offset, 12);
versionShit = new FlxText(5, FlxG.height - 18, 0, "Offset (Left, Right): " + FlxG.save.data.offset + " - Description - " + currentDescription, 12);
versionShit.scrollFactor.set();
versionShit.setFormat("VCR OSD Mono", 16, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
add(versionShit);
@ -65,39 +80,120 @@ class OptionsMenu extends MusicBeatState
super.create();
}
var isCat:Bool = false;
override function update(elapsed:Float)
{
super.update(elapsed);
if (controls.BACK)
if (controls.BACK && !isCat)
FlxG.switchState(new MainMenuState());
else if (controls.BACK)
{
isCat = false;
grpControls.clear();
for (i in 0...options.length)
{
var controlLabel:Alphabet = new Alphabet(0, (70 * i) + 30, options[i].getName(), true, false);
controlLabel.isMenuItem = true;
controlLabel.targetY = i;
grpControls.add(controlLabel);
// DONT PUT X IN THE FIRST PARAMETER OF new ALPHABET() !!
}
curSelected = 0;
}
if (controls.UP_P)
changeSelection(-1);
if (controls.DOWN_P)
changeSelection(1);
if (controls.RIGHT_R)
if (isCat)
{
FlxG.save.data.offset++;
versionShit.text = "Offset (Left, Right): " + FlxG.save.data.offset;
switch(currentSelectedCat.getOptions()[curSelected].getDisplay())
{
case 'FPS Cap':
var fps = (cast (Lib.current.getChildAt(0), Main)).getFPSCap();
if (FlxG.keys.pressed.RIGHT && fps < 285) // actual cap is 285
{
(cast (Lib.current.getChildAt(0), Main)).setFPSCap(fps + 10);
FlxG.save.data.fpsCap = fps + 10;
}
if (controls.LEFT_R)
if (FlxG.keys.pressed.LEFT && fps > 60)
{
(cast (Lib.current.getChildAt(0), Main)).setFPSCap(fps - 10);
FlxG.save.data.fpsCap = fps - 10;
}
versionShit.text = "Current FPS Cap: " + fps + " - Description - " + currentDescription;
case 'Scroll Speed':
if (FlxG.keys.justPressed.RIGHT)
FlxG.save.data.scrollSpeed+=0.1;
if (FlxG.keys.justPressed.LEFT)
FlxG.save.data.scrollSpeed-=0.1;
// caps
if (FlxG.save.data.scrollSpeed < 0)
FlxG.save.data.scrollSpeed = 0.1;
if (FlxG.save.data.scrollSpeed > 10)
FlxG.save.data.scrollSpeed = 10;
versionShit.text = "Current Scroll Speed: " + FlxG.save.data.scrollSpeed + " - Description - " + currentDescription;
default:
if (FlxG.keys.pressed.RIGHT)
FlxG.save.data.offset++;
if (FlxG.keys.pressed.LEFT)
FlxG.save.data.offset--;
versionShit.text = "Offset (Left, Right): " + FlxG.save.data.offset;
versionShit.text = "Offset (Left, Right): " + FlxG.save.data.offset + " - Description - " + currentDescription;
}
}
else
{
if (FlxG.keys.pressed.RIGHT)
FlxG.save.data.offset++;
if (FlxG.keys.pressed.LEFT)
FlxG.save.data.offset--;
versionShit.text = "Offset (Left, Right): " + FlxG.save.data.offset + " - Description - " + currentDescription;
}
if (controls.ACCEPT)
{
if (options[curSelected].press()) {
if (isCat)
{
if (currentSelectedCat.getOptions()[curSelected].press()) {
grpControls.remove(grpControls.members[curSelected]);
var ctrl:Alphabet = new Alphabet(0, (70 * curSelected) + 30, options[curSelected].getDisplay(), true, false);
var ctrl:Alphabet = new Alphabet(0, (70 * curSelected) + 30, currentSelectedCat.getOptions()[curSelected].getDisplay(), true, false);
ctrl.isMenuItem = true;
grpControls.add(ctrl);
}
}
else
{
currentSelectedCat = options[curSelected];
isCat = true;
grpControls.clear();
for (i in 0...currentSelectedCat.getOptions().length)
{
var controlLabel:Alphabet = new Alphabet(0, (70 * i) + 30, currentSelectedCat.getOptions()[i].getDisplay(), true, false);
controlLabel.isMenuItem = true;
controlLabel.targetY = i;
grpControls.add(controlLabel);
// DONT PUT X IN THE FIRST PARAMETER OF new ALPHABET() !!
}
curSelected = 0;
}
}
FlxG.save.flush();
}
@ -118,6 +214,12 @@ class OptionsMenu extends MusicBeatState
if (curSelected >= grpControls.length)
curSelected = 0;
if (isCat)
currentDescription = currentSelectedCat.getOptions()[curSelected].getDescription();
else
currentDescription = "Please select a catagory";
versionShit.text = "Offset (Left, Right): " + FlxG.save.data.offset + " - Description - " + currentDescription;
// selector.y = (70 * curSelected) + 30;
var bullShit:Int = 0;

View File

@ -1,5 +1,6 @@
package;
import openfl.Lib;
import Section.SwagSection;
import Song.SwagSong;
import WiggleEffect.WiggleEffectType;
@ -65,6 +66,8 @@ class PlayState extends MusicBeatState
public static var rep:Replay;
public static var loadRep:Bool = false;
public static var noteBools:Array<Bool> = [false, false, false, false];
var halloweenLevel:Bool = false;
var songLength:Float = 0;
@ -275,9 +278,11 @@ class PlayState extends MusicBeatState
dialogue = CoolUtil.coolTextFile(Paths.txt('thorns/thornsDialogue'));
}
if (SONG.song.toLowerCase() == 'spookeez' || SONG.song.toLowerCase() == 'monster' || SONG.song.toLowerCase() == 'south')
switch(SONG.song.toLowerCase())
{
curStage = "spooky";
case 'spookeez' | 'monster' | 'south':
{
curStage = 'spooky';
halloweenLevel = true;
var hallowTex = Paths.getSparrowAtlas('halloween_bg');
@ -292,7 +297,7 @@ class PlayState extends MusicBeatState
isHalloween = true;
}
else if (SONG.song.toLowerCase() == 'pico' || SONG.song.toLowerCase() == 'blammed' || SONG.song.toLowerCase() == 'philly')
case 'pico' | 'blammed' | 'philly':
{
curStage = 'philly';
@ -334,7 +339,7 @@ class PlayState extends MusicBeatState
var street:FlxSprite = new FlxSprite(-40, streetBehind.y).loadGraphic(Paths.image('philly/street'));
add(street);
}
else if (SONG.song.toLowerCase() == 'milf' || SONG.song.toLowerCase() == 'satin-panties' || SONG.song.toLowerCase() == 'high')
case 'milf' | 'satin-panties' | 'high':
{
curStage = 'limo';
defaultCamZoom = 0.90;
@ -381,7 +386,7 @@ class PlayState extends MusicBeatState
fastCar = new FlxSprite(-300, 160).loadGraphic(Paths.image('limo/fastCarLol'));
// add(limo);
}
else if (SONG.song.toLowerCase() == 'cocoa' || SONG.song.toLowerCase() == 'eggnog')
case 'cocoa' | 'eggnog':
{
curStage = 'mall';
@ -437,7 +442,7 @@ class PlayState extends MusicBeatState
santa.antialiasing = true;
add(santa);
}
else if (SONG.song.toLowerCase() == 'winter-horrorland')
case 'winter-horrorland':
{
curStage = 'mallEvil';
var bg:FlxSprite = new FlxSprite(-400, -500).loadGraphic(Paths.image('christmas/evilBG'));
@ -457,7 +462,7 @@ class PlayState extends MusicBeatState
evilSnow.antialiasing = true;
add(evilSnow);
}
else if (SONG.song.toLowerCase() == 'senpai' || SONG.song.toLowerCase() == 'roses')
case 'senpai' | 'roses':
{
curStage = 'school';
@ -524,7 +529,7 @@ class PlayState extends MusicBeatState
bgGirls.updateHitbox();
add(bgGirls);
}
else if (SONG.song.toLowerCase() == 'thorns')
case 'thorns':
{
curStage = 'schoolEvil';
@ -548,13 +553,11 @@ class PlayState extends MusicBeatState
// bg.setGraphicSize(Std.int(bg.width * 6));
// bg.updateHitbox();
add(bg);
var fg:FlxSprite = new FlxSprite(posX, posY).loadGraphic(Paths.image('weeb/evilSchoolFG'));
fg.scale.set(6, 6);
// fg.setGraphicSize(Std.int(fg.width * 6));
// fg.updateHitbox();
add(fg);
wiggleShit.effectType = WiggleEffectType.DREAMY;
wiggleShit.waveAmplitude = 0.01;
wiggleShit.waveFrequency = 60;
@ -567,26 +570,22 @@ class PlayState extends MusicBeatState
/*
var waveSprite = new FlxEffectSprite(bg, [waveEffectBG]);
var waveSpriteFG = new FlxEffectSprite(fg, [waveEffectFG]);
// Using scale since setGraphicSize() doesnt work???
waveSprite.scale.set(6, 6);
waveSpriteFG.scale.set(6, 6);
waveSprite.setPosition(posX, posY);
waveSpriteFG.setPosition(posX, posY);
waveSprite.scrollFactor.set(0.7, 0.8);
waveSpriteFG.scrollFactor.set(0.9, 0.8);
// waveSprite.setGraphicSize(Std.int(waveSprite.width * 6));
// waveSprite.updateHitbox();
// waveSpriteFG.setGraphicSize(Std.int(fg.width * 6));
// waveSpriteFG.updateHitbox();
add(waveSprite);
add(waveSpriteFG);
*/
}
else
default:
{
defaultCamZoom = 0.9;
curStage = 'stage';
@ -613,7 +612,7 @@ class PlayState extends MusicBeatState
add(stageCurtains);
}
}
var gfVersion:String = 'gf';
switch (curStage)
@ -763,7 +762,7 @@ class PlayState extends MusicBeatState
add(camFollow);
FlxG.camera.follow(camFollow, LOCKON, 0.01);
FlxG.camera.follow(camFollow, LOCKON, 0.04 * (30 / (cast (Lib.current.getChildAt(0), Main)).getFPS()));
// FlxG.camera.setScrollBounds(0, FlxG.width, 0, FlxG.height);
FlxG.camera.zoom = defaultCamZoom;
FlxG.camera.focusOn(camFollow.getPosition());
@ -1477,7 +1476,7 @@ class PlayState extends MusicBeatState
ranking = "(MFC)";
else if (misses == 0 && bads == 0 && shits == 0 && goods >= 1) // Good Full Combo (Nothing but Goods & Sicks)
ranking = "(GFC)";
else if ((shits < 10 && shits != 0 || bads < 10 && bads != 0) && misses == 0) // Single Digit Combo Breaks
else if ((shits < 10 && shits != 0) && misses == 0) // Single Digit Combo Breaks
ranking = "(SDCB)";
else if (misses == 0 && (shits >= 10)) // Regular FC
ranking = "(FC)";
@ -1882,9 +1881,9 @@ class PlayState extends MusicBeatState
}
if (FlxG.save.data.downscroll)
daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (-0.45 * FlxMath.roundDecimal(SONG.speed, 2)));
daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (-0.45 * FlxMath.roundDecimal(FlxG.save.data.scrollSpeed == 1 ? SONG.speed : FlxG.save.data.scrollSpeed, 2)));
else
daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(SONG.speed, 2)));
daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(FlxG.save.data.scrollSpeed == 1 ? SONG.speed : FlxG.save.data.scrollSpeed, 2)));
//trace(daNote.y);
// WIP interpolation shit? Need to fix the pause issue
// daNote.y = (strumLine.y - (songTime - daNote.strumTime) * (0.45 * PlayState.SONG.speed));
@ -2381,6 +2380,7 @@ class PlayState extends MusicBeatState
{
for (coolNote in possibleNotes)
{
if (controlArray[coolNote.noteData])
goodNoteHit(coolNote);
else
@ -2398,6 +2398,17 @@ class PlayState extends MusicBeatState
{
if (loadRep)
{
var noteDiff:Float = Math.abs(daNote.strumTime - Conductor.songPosition);
if (noteDiff > Conductor.safeZoneOffset * 0.70 || noteDiff < Conductor.safeZoneOffset * -0.70)
daNote.rating = "shit";
else if (noteDiff > Conductor.safeZoneOffset * 0.50 || noteDiff < Conductor.safeZoneOffset * -0.50)
daNote.rating = "bad";
else if (noteDiff > Conductor.safeZoneOffset * 0.45 || noteDiff < Conductor.safeZoneOffset * -0.45)
daNote.rating = "good";
else if (noteDiff < Conductor.safeZoneOffset * 0.44 && noteDiff > Conductor.safeZoneOffset * -0.44)
daNote.rating = "sick";
if (NearlyEquals(daNote.strumTime,rep.replay.keyPresses[repPresses].time, 30))
{
goodNoteHit(daNote);
@ -2417,6 +2428,16 @@ class PlayState extends MusicBeatState
{
if (NearlyEquals(coolNote.strumTime,rep.replay.keyPresses[repPresses].time, 30))
{
var noteDiff:Float = Math.abs(coolNote.strumTime - Conductor.songPosition);
if (noteDiff > Conductor.safeZoneOffset * 0.70 || noteDiff < Conductor.safeZoneOffset * -0.70)
coolNote.rating = "shit";
else if (noteDiff > Conductor.safeZoneOffset * 0.50 || noteDiff < Conductor.safeZoneOffset * -0.50)
coolNote.rating = "bad";
else if (noteDiff > Conductor.safeZoneOffset * 0.45 || noteDiff < Conductor.safeZoneOffset * -0.45)
coolNote.rating = "good";
else if (noteDiff < Conductor.safeZoneOffset * 0.44 && noteDiff > Conductor.safeZoneOffset * -0.44)
coolNote.rating = "sick";
goodNoteHit(coolNote);
trace('force note hit');
}
@ -2434,6 +2455,17 @@ class PlayState extends MusicBeatState
{
if (NearlyEquals(daNote.strumTime,rep.replay.keyPresses[repPresses].time, 30))
{
var noteDiff:Float = Math.abs(daNote.strumTime - Conductor.songPosition);
if (noteDiff > Conductor.safeZoneOffset * 0.70 || noteDiff < Conductor.safeZoneOffset * -0.70)
daNote.rating = "shit";
else if (noteDiff > Conductor.safeZoneOffset * 0.50 || noteDiff < Conductor.safeZoneOffset * -0.50)
daNote.rating = "bad";
else if (noteDiff > Conductor.safeZoneOffset * 0.45 || noteDiff < Conductor.safeZoneOffset * -0.45)
daNote.rating = "good";
else if (noteDiff < Conductor.safeZoneOffset * 0.44 && noteDiff > Conductor.safeZoneOffset * -0.44)
daNote.rating = "sick";
goodNoteHit(daNote);
trace('force note hit');
}
@ -2714,6 +2746,17 @@ class PlayState extends MusicBeatState
function noteCheck(controlArray:Array<Bool>, note:Note):Void // sorry lol
{
var noteDiff:Float = Math.abs(note.strumTime - Conductor.songPosition);
if (noteDiff > Conductor.safeZoneOffset * 0.70 || noteDiff < Conductor.safeZoneOffset * -0.70)
note.rating = "shit";
else if (noteDiff > Conductor.safeZoneOffset * 0.50 || noteDiff < Conductor.safeZoneOffset * -0.50)
note.rating = "bad";
else if (noteDiff > Conductor.safeZoneOffset * 0.45 || noteDiff < Conductor.safeZoneOffset * -0.45)
note.rating = "good";
else if (noteDiff < Conductor.safeZoneOffset * 0.44 && noteDiff > Conductor.safeZoneOffset * -0.44)
note.rating = "sick";
if (loadRep)
{
if (controlArray[note.noteData])
@ -2738,6 +2781,7 @@ class PlayState extends MusicBeatState
if (mashing <= getKeyPresses(note) && mashViolations < 2)
{
mashViolations++;
goodNoteHit(note, (mashing <= getKeyPresses(note)));
}
else
@ -2759,6 +2803,17 @@ class PlayState extends MusicBeatState
function goodNoteHit(note:Note, resetMashViolation = true):Void
{
var noteDiff:Float = Math.abs(note.strumTime - Conductor.songPosition);
if (noteDiff > Conductor.safeZoneOffset * 0.70 || noteDiff < Conductor.safeZoneOffset * -0.70)
note.rating = "shit";
else if (noteDiff > Conductor.safeZoneOffset * 0.50 || noteDiff < Conductor.safeZoneOffset * -0.50)
note.rating = "bad";
else if (noteDiff > Conductor.safeZoneOffset * 0.45 || noteDiff < Conductor.safeZoneOffset * -0.45)
note.rating = "good";
else if (noteDiff < Conductor.safeZoneOffset * 0.44 && noteDiff > Conductor.safeZoneOffset * -0.44)
note.rating = "sick";
if (resetMashViolation)
mashViolations--;
@ -2982,11 +3037,12 @@ class PlayState extends MusicBeatState
if (curBeat % 8 == 7 && curSong == 'Bopeebo')
{
boyfriend.playAnim('hey', true);
if (SONG.song == 'Tutorial' && dad.curCharacter == 'gf')
{
dad.playAnim('cheer', true);
}
if (curBeat % 16 == 15 && SONG.song == 'Tutorial' && dad.curCharacter == 'gf' && curBeat > 16 && curBeat < 48)
{
boyfriend.playAnim('hey', true);
dad.playAnim('cheer', true);
}
switch (curStage)

View File

@ -300,7 +300,7 @@ class TitleState extends MusicBeatState
http.onData = function (data:String) {
if (!MainMenuState.kadeEngineVer.contains(data.trim()) && !OutdatedSubState.leftState)
if (!MainMenuState.kadeEngineVer.contains(data.trim()) && !OutdatedSubState.leftState && MainMenuState.nightly == "")
{
trace('outdated lmao! ' + data.trim() + ' != ' + MainMenuState.kadeEngineVer);
OutdatedSubState.needVer = data;