Interface IClickedHitObject
Implement this if you want notification of event when a Hit Object is pressed/collected/missed. Remember to call SetOnClickedHitObject(IClickedHitObject) before starting the game, for this to actually work.
Namespace: MouseDance.Runtime.Callbacks
Assembly: MouseDance.Runtime.dll
Syntax
public interface IClickedHitObject
Methods
OnClickedHitCircle(Int32, Int32, Single, Int32, Beatmap)
Called by the BeatmapRunner when player clicks on a Hit Circle.
Declaration
void OnClickedHitCircle(int idxClicked, int idxThatNeedsToBePressed, float result, int gotBaseScore, Beatmap beatmap)
Parameters
Type | Name | Description |
---|---|---|
Int32 | idxClicked | Index of Hit Circle pressed. |
Int32 | idxThatNeedsToBePressed | Index of Hit Object that needs to be pressed. If this doesn't match idxPressed, then player clicked on something they shouldn't yet. |
Single | result | Normalized value indicating if user pressed Hit Circle 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 hit time. |
Int32 | gotBaseScore | The 50, 100, or 300 score that the press of this Hit Circle got. This value is not directly added to the player's score yet (because score will still be multiplied), just a representation of which time window the player pressed. |
OsuParsers.Beatmaps.Beatmap | beatmap | Data of the entire beatmap. Use |
OnClickedSliderHead(Int32, Int32, Single, Int32, Beatmap)
Called by the BeatmapRunner when player clicks on a Slider head/start cap.
Declaration
void OnClickedSliderHead(int idxClicked, int idxThatNeedsToBePressed, float result, int gotBaseScore, Beatmap beatmap)
Parameters
Type | Name | Description |
---|---|---|
Int32 | idxClicked | Index of Slider pressed. |
Int32 | idxThatNeedsToBePressed | Index of Hit Object that needs to be pressed. If this doesn't match idxPressed, then player clicked on something they shouldn't yet. |
Single | result | Normalized value indicating if user pressed slider's head 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 slider head's hit time. |
Int32 | gotBaseScore | The equivalent 50, 100, or 300 score that the press of this Slider Head would get. This score is not added to the player's score, just a representation of which time window the player pressed. |
OsuParsers.Beatmaps.Beatmap | beatmap | Data of the entire beatmap. Use |
OnHitCircleDieOff(Int32, Beatmap)
Called by the BeatmapRunner when a Hit Circle's time is up and player never clicked on it.
Declaration
void OnHitCircleDieOff(int hitCircleIdx, Beatmap beatmap)
Parameters
Type | Name | Description |
---|---|---|
Int32 | hitCircleIdx | Hit Circle's Index among the entire beatmap. |
OsuParsers.Beatmaps.Beatmap | beatmap | Data of the entire beatmap. Use |
OnSliderFinished(Int32, Single, Beatmap)
Called when a Slider has finished (ball finished rolling through it).
Declaration
void OnSliderFinished(int sliderIdx, float completionPercent, Beatmap beatmap)
Parameters
Type | Name | Description |
---|---|---|
Int32 | sliderIdx | Index of Slider that was finished. |
Single | completionPercent | 0.0 to 1.0 value of percent completion. 0.0 means 0%, 1.0 means 100%, 0.5 means 50%, etc. |
OsuParsers.Beatmaps.Beatmap | beatmap | Data of the entire beatmap. Use |