This commit is contained in:
lunarcleint
2023-08-14 18:45:35 -07:00
6 changed files with 32 additions and 9 deletions
+3 -3
View File
@@ -5,12 +5,12 @@
<!-- Sing Animations -->
<anim name="singLEFT" anim="Pico Note Right0" fps="24" loop="false" x="65" y="9" />
<anim name="singDOWN" anim="Pico Down Note0" fps="24" loop="false" x="200" y="-70" />
<anim name="singUP" anim="pico Up note0" fps="24" loop="false" x="-20" y="50" />
<anim name="singRIGHT" anim="Pico NOTE LEFT0" fps="24" loop="false" x="-51" y="0" />
<anim name="singUP" anim="pico Up note0" fps="24" loop="false" x="-29" y="27" />
<anim name="singRIGHT" anim="Pico NOTE LEFT0" fps="24" loop="false" x="-68" y="-7" />
<!-- Miss Animations -->
<anim name="singLEFTmiss" anim="Pico Note Right Miss" fps="24" loop="false" x="62" y="64" />
<anim name="singDOWNmiss" anim="Pico Down Note MISS" fps="24" loop="false" x="200" y="-70" />
<anim name="singDOWNmiss" anim="Pico Down Note MISS" fps="24" loop="false" x="210" y="-28" />
<anim name="singUPmiss" anim="pico Up note miss" fps="24" loop="false" x="-19" y="67" />
<anim name="singRIGHTmiss" anim="Pico NOTE LEFT miss" fps="24" loop="false" x="-60" y="41" />
</character>
@@ -20,6 +20,7 @@ class ScriptsMacro {
"flixel.addons.plugin", "flixel.addons.text", "flixel.addons.tile", "flixel.addons.transition",
"flixel.addons.util",
// OTHER LIBRARIES & STUFF
"funkin",
"away3d", "flx3d",
#if VIDEO_CUTSCENES "hxcodec.flixel", "hxcodec.openfl", "hxcodec.lime", #end
// BASE HAXE
+2 -2
View File
@@ -31,7 +31,7 @@ class NdllUtil {
* @param name Name of the function.
* @param args Number of arguments of that function.
*/
public static function getFunction(ndll:String, name:String, args:Int) {
public static function getFunction(ndll:String, name:String, args:Int):Dynamic {
#if NDLLS_SUPPORTED
return getFunctionFromPath(Paths.ndll('$ndll-$os'), name, args);
#else
@@ -47,7 +47,7 @@ class NdllUtil {
* @param name Name of the function.
* @param args Number of arguments of that function.
*/
public static function getFunctionFromPath(ndll:String, name:String, args:Int) {
public static function getFunctionFromPath(ndll:String, name:String, args:Int):Dynamic {
#if NDLLS_SUPPORTED
if (!Assets.exists(ndll)) {
Logs.trace('Couldn\'t find ndll at ${ndll}.', WARNING);
+2 -2
View File
@@ -1456,9 +1456,9 @@ class PlayState extends MusicBeatState
var event:NoteHitEvent;
if (strumLine != null && !strumLine.cpu)
event = scripts.event("onPlayerHit", EventManager.get(NoteHitEvent).recycle(false, !note.isSustainNote, !note.isSustainNote, note, strumLine.characters, true, note.noteType, note.animSuffix.getDefault(strumLine.altAnim ? "-alt" : ""), "game/score/", "", note.strumID, score, note.isSustainNote ? null : accuracy, 0.023, daRating, Options.splashesEnabled && !note.isSustainNote && daRating == "sick"));
event = scripts.event("onPlayerHit", EventManager.get(NoteHitEvent).recycle(false, !note.isSustainNote, !note.isSustainNote, note, strumLine.characters, true, note.noteType, note.animSuffix.getDefault(note.strumID < strumLine.members.length ? strumLine.members[note.strumID].animSuffix : strumLine.animSuffix), "game/score/", "", note.strumID, score, note.isSustainNote ? null : accuracy, 0.023, daRating, Options.splashesEnabled && !note.isSustainNote && daRating == "sick"));
else
event = scripts.event("onDadHit", EventManager.get(NoteHitEvent).recycle(false, false, false, note, strumLine.characters, false, note.noteType, note.animSuffix.getDefault(strumLine.altAnim ? "-alt" : ""), "game/score/", "", note.strumID, 0, null, 0, daRating, false));
event = scripts.event("onDadHit", EventManager.get(NoteHitEvent).recycle(false, false, false, note, strumLine.characters, false, note.noteType, note.animSuffix.getDefault(note.strumID < strumLine.members.length ? strumLine.members[note.strumID].animSuffix : strumLine.animSuffix), "game/score/", "", note.strumID, 0, null, 0, daRating, false));
strumLine.onHit.dispatch(event);
scripts.event("onNoteHit", event);
+6 -1
View File
@@ -6,7 +6,12 @@ import funkin.backend.system.Conductor;
class Strum extends FlxSprite {
public var extra:Map<String, Dynamic> = [];
public var cpu = false;
/**
* Which animation suffix on characters that should be used when hitting notes.
*/
public var animSuffix:String = "";
public var cpu = false; // Unused
public var lastHit:Float = -5000;
public var scrollSpeed:Null<Float> = null; // custom scroll speed per strum
+18 -1
View File
@@ -65,7 +65,11 @@ class StrumLine extends FlxTypedGroup<Strum> {
/**
* Whenever alt animation is enabled on this strumline.
*/
public var altAnim:Bool = false;
public var altAnim(get, set):Bool;
/**
* Which animation suffix on characters that should be used when hitting notes.
*/
public var animSuffix(default, set):String = "";
/**
* TODO: Write documention about this being a variable that can help when making multi key
*/
@@ -353,5 +357,18 @@ class StrumLine extends FlxTypedGroup<Strum> {
s.cpu = b;
return cpu = b;
}
private inline function set_animSuffix(str:String):String {
for(s in members)
if (s != null)
s.animSuffix = str;
return animSuffix = str;
}
private inline function set_altAnim(b:Bool):Bool {
animSuffix = b ? "-alt" : "";
return b;
}
private inline function get_altAnim():Bool {
return animSuffix == "-alt";
}
#end
}