1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-12-23 21:56:46 +00:00

make code a bit simpler

This commit is contained in:
lemz 2024-06-05 19:47:34 +02:00 committed by EliteMasterEric
parent bb97549171
commit 49d302be95

View file

@ -48,15 +48,6 @@ class ChartEditorHoldNoteSprite extends SustainTrail
super(0, 100, noteStyle);
this.parentState = parent;
zoom = 1.0;
zoom *= noteStyle.fetchHoldNoteScale();
zoom *= 0.7;
zoom *= ChartEditorState.GRID_SIZE / Strumline.STRUMLINE_SIZE;
flipY = false;
setup();
}
@:nullSafety(Off)
@ -64,17 +55,38 @@ class ChartEditorHoldNoteSprite extends SustainTrail
{
var bruhStyle:NoteStyle = NoteStyleRegistry.instance.fetchEntry(noteStyle);
setupHoldNoteGraphic(bruhStyle);
}
override function setupHoldNoteGraphic(noteStyle:NoteStyle):Void
{
loadGraphic(noteStyle.getHoldNoteAssetPath());
antialiasing = true;
this.isPixel = noteStyle.isHoldNotePixel();
if (isPixel)
{
endOffset = bottomClip = 1;
antialiasing = false;
}
zoom = 1.0;
zoom *= bruhStyle.fetchHoldNoteScale();
zoom *= noteStyle.fetchHoldNoteScale();
zoom *= 0.7;
zoom *= ChartEditorState.GRID_SIZE / Strumline.STRUMLINE_SIZE;
graphicWidth = graphic.width / 8 * zoom; // amount of notes * 2
graphicHeight = sustainLength * 0.45; // sustainHeight
flipY = false;
setup();
alpha = 1.0;
triggerRedraw();
updateColorTransform();
updateClipping();
setup();
}
public override function updateHitbox():Void