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

Search Results for

    Interface ICustomCollectRule

    Implement this if you want to add custom rules on how Hit Objects are pressed. Remember to call SetCustomCollectRule(ICustomCollectRule) before starting the game, for this to actually work.

    Namespace: MouseDance.Runtime.Callbacks
    Assembly: MouseDance.Runtime.dll
    Syntax
    public interface ICustomCollectRule

    Methods

    AllowCollect(IHitObject, IReadOnlyList<IHitObject>)

    Called by the BeatmapRunner to check if player is allowed to proceed with pressing the Hit Object they clicked on.

    Declaration
    HitObjectReaction AllowCollect(IHitObject hitObject, IReadOnlyList<IHitObject> allPressed)
    Parameters
    Type Name Description
    IHitObject hitObject

    The Hit Object we are checking.

    IReadOnlyList<IHitObject> allPressed

    List of all Hit Objects pressed, in case player pressed on overlapping Hit Objects. This is sorted by Hit Object Index meaning first element in this list is the one that is visually topmost (in terms of Z-order) on the screen. If there is only one Hit Object pressed, then allPressed will only contain one element.

    Returns
    Type Description
    HitObjectReaction

    HitObjectReaction struct containing all info on how you want the Hit Object to react.

    Remarks

    This is called the same frame that IsPlayerInputDown returns true. It is called for each Hit Object found under the mouse (in case the player clicked on overlapping Hit Objects).

    AllowCollectSliderPart(IHitObject)

    Called by the BeatmapRunner to check if player is allowed to proceed with collecting a Slider Part that they're currently pressing on.

    Declaration
    bool AllowCollectSliderPart(IHitObject slider)
    Parameters
    Type Name Description
    IHitObject slider

    The Slider we're checking for.

    Returns
    Type Description
    Boolean

    Return true to allow the Slider Part to be collected.