MouseDance MouseDance
MouseDance MouseDance
MouseDance User Docs powered by DocFx, DiscordFx

Search Results for

    Interface IBeatmapRunner

    Used by Hit Objects to report when they are pressed (for adding score).

    Namespace: MouseDance.Runtime
    Assembly: MouseDance.Runtime.dll
    Syntax
    public interface IBeatmapRunner

    Methods

    CanCollectSliderPart(IHitObject)

    Called by Slider to check if we can proceed with collecting a Slider part.

    Declaration
    bool CanCollectSliderPart(IHitObject slider)
    Parameters
    Type Name Description
    IHitObject slider
    Returns
    Type Description
    Boolean

    True if we allow the Slider to collect the Slider part.

    OnUserFinishedSlider(IHitObjectWithEvents, Int32, Int32, Int32, Boolean)

    Called by Slider to let the BeatmapRunner know that the Slider has finished while user has their mouse down on it at that time. This is for letting the BeatmapRunner add score and to tally that the Slider was successfully collected.

    Declaration
    void OnUserFinishedSlider(IHitObjectWithEvents slider, int headScore, int collected, int total, bool pressWasEverReleased)
    Parameters
    Type Name Description
    IHitObjectWithEvents slider

    Slider that was finished.

    Int32 headScore

    What score the player got when they pressed on the Slider's head.

    Int32 collected

    How many parts of the Slider was pressed (head, ticks, and tail).

    Int32 total

    Total number of parts the Slider has (head, ticks, and tail).

    Boolean pressWasEverReleased

    Even if player has their mouse down right now, did player ever release their press of the button throughout the Slider?

    OnUserPressedHitCircle(IHitObjectWithEvents)

    Called by OnPressed(Int32) to let BeatmapRunner know that the user pressed on the HitCircle so it can tally and add to the score. Simultaneously, this also lets the Hit Circle know if user pressed within correct time window and how much score was received for it.

    Declaration
    (float, int) OnUserPressedHitCircle(IHitObjectWithEvents hitCircle)
    Parameters
    Type Name Description
    IHitObjectWithEvents hitCircle

    Hit Circle that was pressed.

    Returns
    Type Description
    (T1, T2)<Single, Int32>

    Single: Normalized value indicating if user pressed within correct time window. -1.0 to +1.0 is a hit. Any value outside that (lesser than -1.0 or greater than +1.0) means miss (negative for too early, positive for too late). 0.0 means user pressed exactly at hit circle's time.

    int: score given for this particular pressed hit circle

    OnUserPressedSliderHead(Int32)

    Called by OnPressed(Int32) when user pressed the head (aka Start Cap) of a Slider. This is used to let the Slider know if user pressed within the correct time window, and what the equivalent score would be for that head press.

    Declaration
    (float, int) OnUserPressedSliderHead(int idx)
    Parameters
    Type Name Description
    Int32 idx

    Index of the Slider that was pressed.

    Returns
    Type Description
    (T1, T2)<Single, Int32>

    Single: Normalized value indicating if user pressed slider's head within correct time window. -1 to +1 is a hit. Any value outside that (lesser than -1 or greater than +1) means miss (negative for too early, positive for too late). 0 means user pressed exactly at slider head's hit time.

    int: Equivalent score for pressing the Slider head. The score value here is not added to the player's score, but is calculated to let you know if the user did a perfect press or not.