Skip to content
This repository has been archived by the owner on Jan 26, 2025. It is now read-only.

Commit

Permalink
im dumb
Browse files Browse the repository at this point in the history
  • Loading branch information
MaybeMaru committed Nov 25, 2023
1 parent 9cb5daf commit 2eba8ce
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions source/funkin/objects/note/Note.hx
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,13 @@ class Note extends FlxSpriteExt implements INoteData {
public var susOffsetX:Float = 0;

public function setupSustain() {
susRect = FlxRect.get();
drawSustain(true);
susOffsetX = -(NoteUtil.swagWidth * 0.5 - width * 0.5);
offset.set(susOffsetX,0);
alpha = 0.6;
if (isSustainNote) {
if (susRect == null) susRect = FlxRect.get();
drawSustain(true);
susOffsetX = -(NoteUtil.swagWidth * 0.5 - width * 0.5);
offset.set(susOffsetX,0);
alpha = 0.6;
}
}

public function new (noteData:Int = 0, strumTime:Float = 0, susLength:Float = 0, skin:String = 'default') {
Expand All @@ -75,7 +77,7 @@ class Note extends FlxSpriteExt implements INoteData {
approachAngle = Preferences.getPref('downscroll') ? 180 : 0;

createGraphic();
if (isSustainNote) setupSustain();
setupSustain();
}

public var pressed:Bool = false;
Expand Down

0 comments on commit 2eba8ce

Please sign in to comment.