the funny commit

This commit is contained in:
KadeDev 2021-04-02 14:44:15 -07:00
parent 2442602e49
commit 33e236fd45
4 changed files with 28 additions and 6 deletions

View File

@ -28,6 +28,11 @@ class DiscordClient
DiscordRpc.shutdown();
}
public static function shutdown()
{
DiscordRpc.shutdown();
}
static function onReady()
{
DiscordRpc.presence({

View File

@ -1,5 +1,6 @@
package;
import Discord.DiscordClient;
import flixel.tweens.FlxTween;
import flixel.util.FlxColor;
import openfl.Lib;
@ -32,6 +33,7 @@ class MusicBeatState extends FlxUIState
super.create();
}
var array:Array<FlxColor> = [
FlxColor.fromRGB(148, 0, 211),
FlxColor.fromRGB(75, 0, 130),
@ -66,6 +68,9 @@ class MusicBeatState extends FlxUIState
else
skippedFrames++;
if ((cast (Lib.current.getChildAt(0), Main)).getFPSCap != FlxG.save.data.fpsCap)
(cast (Lib.current.getChildAt(0), Main)).setFPSCap(FlxG.save.data.fpsCap);
super.update(elapsed);
}

View File

@ -84,6 +84,13 @@ class OptionsMenu extends MusicBeatState
var isCat:Bool = false;
function truncateFloat( number : Float, precision : Int): Float {
var num = number;
num = num * Math.pow(10, precision);
num = Math.round( num ) / Math.pow(10, precision);
return num;
}
override function update(elapsed:Float)
{
super.update(elapsed);
@ -149,23 +156,23 @@ class OptionsMenu extends MusicBeatState
versionShit.text = "Current Scroll Speed: " + FlxG.save.data.scrollSpeed + " - Description - " + currentDescription;
default:
if (FlxG.keys.pressed.RIGHT)
FlxG.save.data.offset += 0.1;
FlxG.save.data.offset += 0.01;
if (FlxG.keys.pressed.LEFT)
FlxG.save.data.offset -= 0.1;
FlxG.save.data.offset -= 0.01;
versionShit.text = "Offset (Left, Right): " + FlxG.save.data.offset + " - Description - " + currentDescription;
versionShit.text = "Offset (Left, Right): " + truncateFloat(FlxG.save.data.offset,2) + " - Description - " + currentDescription;
}
}
else
{
if (FlxG.keys.pressed.RIGHT)
FlxG.save.data.offset++;
FlxG.save.data.offset+= 0.01;
if (FlxG.keys.pressed.LEFT)
FlxG.save.data.offset--;
FlxG.save.data.offset-= 0.01;
versionShit.text = "Offset (Left, Right): " + FlxG.save.data.offset + " - Description - " + currentDescription;
versionShit.text = "Offset (Left, Right): " + truncateFloat(FlxG.save.data.offset,2) + " - Description - " + currentDescription;
}

View File

@ -61,6 +61,11 @@ class TitleState extends MusicBeatState
#if desktop
DiscordClient.initialize();
Application.current.onExit.add (function (exitCode) {
DiscordClient.shutdown();
});
#end
curWacky = FlxG.random.getObject(getIntroTextShit());