fixes
This commit is contained in:
@@ -669,7 +669,6 @@ class Charter extends UIState {
|
||||
for(assetPath in [Paths.chart(__song, __diff.toLowerCase()), instPath]) {
|
||||
var path = Assets.getPath(assetPath);
|
||||
var filteredPath = path.substr(0, path.lastIndexOf(assetPath == instPath ? '/song/' : '/charts/'));
|
||||
trace(filteredPath);
|
||||
saveTo(filteredPath);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -153,11 +153,11 @@ class Note extends FlxSprite
|
||||
}
|
||||
|
||||
scale.set(event.noteScale, event.noteScale);
|
||||
updateHitbox();
|
||||
antialiasing = true;
|
||||
}
|
||||
}
|
||||
|
||||
updateHitbox();
|
||||
|
||||
if (isSustainNote && prevNote != null)
|
||||
{
|
||||
|
||||
@@ -52,7 +52,7 @@ class Strum extends FlxSprite {
|
||||
daNote.angle = daNote.isSustainNote ? daNote.__noteAngle : angle;
|
||||
|
||||
if (daNote.strumRelativePos) {
|
||||
daNote.setPosition(daNote.isSustainNote ? ((Note.swagWidth - daNote.width) / 2) : 0, (daNote.strumTime - Conductor.songPosition) * (0.45 * FlxMath.roundDecimal(getScrollSpeed(daNote), 2)));
|
||||
daNote.setPosition((Note.swagWidth - daNote.width) / 2, (daNote.strumTime - Conductor.songPosition) * (0.45 * FlxMath.roundDecimal(getScrollSpeed(daNote), 2)));
|
||||
if (daNote.isSustainNote) daNote.y += N_WIDTHDIV2;
|
||||
} else {
|
||||
var offset = FlxPoint.get(0, (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(getScrollSpeed(daNote), 2)));
|
||||
|
||||
@@ -197,6 +197,8 @@ class StrumLine extends FlxTypedGroup<Strum> {
|
||||
babyArrow.updateHitbox();
|
||||
babyArrow.scrollFactor.set();
|
||||
|
||||
babyArrow.frameOffset.x -= (Note.swagWidth - babyArrow.width) / 2;
|
||||
|
||||
if (event.__doAnimation)
|
||||
{
|
||||
babyArrow.y -= 10;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package funkin.system;
|
||||
|
||||
import funkin.utils.XMLUtil.IXMLEvents;
|
||||
import flixel.system.FlxAssets.FlxGraphicAsset;
|
||||
import flixel.addons.effects.FlxSkewedSprite;
|
||||
import haxe.io.Path;
|
||||
@@ -29,7 +30,7 @@ abstract XMLAnimType(Int)
|
||||
}
|
||||
}
|
||||
|
||||
class FunkinSprite extends FlxSkewedSprite implements IBeatReceiver implements IOffsetCompatible
|
||||
class FunkinSprite extends FlxSkewedSprite implements IBeatReceiver implements IOffsetCompatible implements IXMLEvents
|
||||
{
|
||||
public var spriteAnimType:XMLAnimType = NONE;
|
||||
public var beatAnims:Array<String> = [];
|
||||
@@ -99,6 +100,11 @@ class FunkinSprite extends FlxSkewedSprite implements IBeatReceiver implements I
|
||||
}
|
||||
}
|
||||
|
||||
public function onPropertySet(property:String, value:Dynamic) {
|
||||
if (property.startsWith("velocity") || property.startsWith("acceleration"))
|
||||
moves = true;
|
||||
}
|
||||
|
||||
public function beatHit(curBeat:Int)
|
||||
{
|
||||
if (beatAnims.length > 0)
|
||||
|
||||
@@ -42,6 +42,10 @@ class XMLUtil {
|
||||
}
|
||||
if (value == null) return VALUE_NULL;
|
||||
|
||||
if (object is IXMLEvents) {
|
||||
cast(object, IXMLEvents).onPropertySet(property.att.name, value);
|
||||
}
|
||||
|
||||
try {
|
||||
Reflect.setProperty(o, keys[0], value);
|
||||
} catch(e) {
|
||||
@@ -210,4 +214,8 @@ typedef AnimData = {
|
||||
var y:Float;
|
||||
var indices:Array<Int>;
|
||||
var animType:XMLAnimType;
|
||||
}
|
||||
|
||||
interface IXMLEvents {
|
||||
public function onPropertySet(property:String, value:Dynamic):Void;
|
||||
}
|
||||
Reference in New Issue
Block a user