This commit is contained in:
Yoshman29
2022-11-05 21:43:00 +01:00
parent bfd3043a1f
commit 2a39887f16
8 changed files with 15 additions and 11 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
function create() {
importScript("data/scripts/pixel");
pixelNotesForBF = false;
enablePixelUI = false;
enablePixelUI = true;
}
function updatePost(elapsed) {
-2
View File
@@ -1,5 +1,3 @@
import flixel.FlxCamera.FlxCameraFollowStyle;
public var pixelNotesForBF = true;
public var pixelNotesForDad = true;
public var enablePixelUI = true;
+1 -1
View File
@@ -100,7 +100,7 @@ function update(elapsed) {
if (controls.ACCEPT) {
FlxG.sound.play(Paths.sound('pixel/clickText'));
var option = menuItems[curSelected]
var option = menuItems[curSelected];
if (option == "Resume" || option == "Exit to menu") {
canDoShit = false;
for(t in texts) t.visible = false;
+1 -1
View File
@@ -1 +1 @@
1157
1160
+2 -2
View File
@@ -384,7 +384,7 @@ class Character extends FlxSprite implements IBeatReceiver implements IOffsetCom
public function playAnim(AnimName:String, Force:Bool = false, Reversed:Bool = false, Frame:Int = 0, Context:PlayAnimContext = NONE):Void
{
var event = new PlayAnimEvent(AnimName, Force, Reversed, Frame);
var event = new PlayAnimEvent(AnimName, Force, Reversed, Frame, Context);
script.call("onPlayAnim", [event]);
@@ -400,7 +400,7 @@ class Character extends FlxSprite implements IBeatReceiver implements IOffsetCom
offset.set(globalOffset.x * (isPlayer != playerOffsets ? 1 : -1), -globalOffset.y);
if (event.animName.startsWith("sing"))
if (event.context != DANCE)
lastHit = Conductor.songPosition;
if (curCharacter == 'gf')
+1 -1
View File
@@ -720,7 +720,7 @@ class PlayState extends MusicBeatState
// TODO: Cancellable Discord Update Presence
#if desktop
// Song duration in a float, useful for the time left feature
songLength = FlxG.sound.music.length;
songLength = inst.length;
// Updating Discord Rich Presence (with Time Left)
DiscordClient.changePresence(detailsText, SONG.song + " (" + difficultyText + ")", iconRPC, true, songLength);
+2 -2
View File
@@ -161,7 +161,7 @@ class FreeplayState extends MusicBeatState
{
super.update(elapsed);
if (FlxG.sound.music.volume < 0.7)
if (FlxG.sound.music != null && FlxG.sound.music.volume < 0.7)
{
FlxG.sound.music.volume += 0.5 * FlxG.elapsed;
}
@@ -336,7 +336,7 @@ class SongMetadata
if (difficulties != null && difficulties.length > 0) {
this.difficulties = difficulties;
} else {
this.difficulties = difficulties = [for(f in Paths.getFolderContent('data/charts/${song}/')) if (Path.extension(f = f.toUpperCase()) == "JSON") Path.withoutExtension(f)];
this.difficulties = difficulties = [for(f in Paths.getFolderContent('data/charts/${song}/', false)) if (Path.extension(f = f.toUpperCase()) == "JSON") Path.withoutExtension(f)];
if (difficulties.length == 3) {
var hasHard = false, hasNormal = false, hasEasy = false;
for(d in difficulties) {
@@ -26,12 +26,13 @@ class PlayAnimEvent extends CancellableEvent {
**/
public var context:PlayAnimContext;
public function new(animName:String, force:Bool, reverse:Bool, startingFrame:Int) {
public function new(animName:String, force:Bool, reverse:Bool, startingFrame:Int, context:PlayAnimContext) {
super();
this.animName = animName;
this.force = force;
this.reverse = reverse;
this.startingFrame = startingFrame;
this.context = context;
}
}
@@ -50,6 +51,11 @@ abstract PlayAnimContext(String) {
**/
var SING = "SING";
/**
Whenever a dance animation is played.
**/
var DANCE = "DANCE";
/**
Whenever a note is missed and a miss animation will be played.
**/