Skip to content

Commit

Permalink
Clean up documentation in StrumlineNote
Browse files Browse the repository at this point in the history
  • Loading branch information
EliteMasterEric committed Oct 5, 2024
1 parent de5cca1 commit bc546e8
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions source/funkin/play/notes/StrumlineNote.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,24 @@ package funkin.play.notes;

import funkin.play.notes.notestyle.NoteStyle;
import flixel.graphics.frames.FlxAtlasFrames;
import flixel.FlxSprite;
import funkin.graphics.FunkinSprite;
import funkin.play.notes.NoteSprite;

/**
* The actual receptor that you see on screen.
*/
class StrumlineNote extends FlxSprite
class StrumlineNote extends FunkinSprite
{
/**
* Whether this strumline note is on the player's side or the opponent's side.
*/
public var isPlayer(default, null):Bool;

/**
* The direction which this strumline note is facing.
*/
public var direction(default, set):NoteDirection;

var confirmHoldTimer:Float = -1;

static final CONFIRM_HOLD_TIME:Float = 0.1;

function set_direction(value:NoteDirection):NoteDirection
{
this.direction = value;
Expand All @@ -30,6 +32,16 @@ class StrumlineNote extends FlxSprite
*/
public var forceActive:Bool = false;

/**
* How long to continue the hold note animation after a note is pressed.
*/
static final CONFIRM_HOLD_TIME:Float = 0.1;

/**
* How long the hold note animation has been playing after a note is pressed.
*/
var confirmHoldTimer:Float = -1;

public function new(noteStyle:NoteStyle, isPlayer:Bool, direction:NoteDirection)
{
super(0, 0);
Expand All @@ -47,7 +59,10 @@ class StrumlineNote extends FlxSprite
this.active = true;
}

function onAnimationFrame(name:String, frameNumber:Int, frameIndex:Int):Void {}
function onAnimationFrame(name:String, frameNumber:Int, frameIndex:Int):Void
{
// Do nothing.
}

function onAnimationFinished(name:String):Void
{
Expand Down

0 comments on commit bc546e8

Please sign in to comment.