Class LeftRightClickHitObjectSet
Example of how to make the game instantiate a differently shaped Hit Object based on the rules.
Used in the Left Right Click Demo.
When the Hit Object is coloured red, we'll instantiate the regular Hit Objects.
When the Hit Object is coloured blue, we'll instantiate a different shape of Hit Objects.
Just like in LeftRightClickDemoMain, we're assuming the colours are assigned properly,
wherein there are only two combo colours, red and blue.
So we can easily figure it out based on the Combo Colour Index: 0 for red, 1 for blue.
Inheritance
LeftRightClickHitObjectSet
Assembly: MouseDance.Demo.dll
Syntax
[CreateAssetMenu(fileName = "LeftRightClickHitObjectSet", menuName = "MouseDance/LeftRightClickHitObjectSet")]
public class LeftRightClickHitObjectSet : HitObjectSet
Fields
HitCirclePrefabForRightClick
Declaration
[Header("Additional Hit Objects")]
[Tooltip("Master-copy of the Hit Circle prefab that will be spawned and pooled when right-click is needed.")]
public HitCircle HitCirclePrefabForRightClick
Field Value
SliderBallPrefabForRightClick
Declaration
[Tooltip("Master-copy of the Slider Ball prefab when right-click is needed. Used by Sliders.")]
public SliderBall SliderBallPrefabForRightClick
Field Value
SliderPrefabForRightClick
Declaration
[Tooltip("Master-copy of the Slider prefab that will be spawned and pooled when right-click is needed.")]
public Slider SliderPrefabForRightClick
Field Value
Methods
GetHitCirclePrefab(Int32, Int32, Int32, HitCircle, Beatmap)
Declaration
public override (string, HitCircle) GetHitCirclePrefab(int idx, int comboCounter, int comboColourIdx, HitCircle hitCircle, Beatmap beatmap)
Parameters
Type |
Name |
Description |
Int32 |
idx |
|
Int32 |
comboCounter |
|
Int32 |
comboColourIdx |
|
OsuParsers.Beatmaps.Objects.HitCircle |
hitCircle |
|
OsuParsers.Beatmaps.Beatmap |
beatmap |
|
Returns
Overrides
GetSliderBallPrefab(String)
Declaration
public override SliderBall GetSliderBallPrefab(string poolId)
Parameters
Type |
Name |
Description |
String |
poolId |
|
Returns
Overrides
GetSliderPrefab(Int32, Int32, Int32, Slider, Beatmap)
Declaration
public override (string, Slider) GetSliderPrefab(int idx, int comboCounter, int comboColourIdx, Slider slider, Beatmap beatmap)
Parameters
Type |
Name |
Description |
Int32 |
idx |
|
Int32 |
comboCounter |
|
Int32 |
comboColourIdx |
|
OsuParsers.Beatmaps.Objects.Slider |
slider |
|
OsuParsers.Beatmaps.Beatmap |
beatmap |
|
Returns
Overrides