Class BasicDemoWithHardRockMain
Simple code usage of IBeatmapLoaded to modify a Beatmap that mimics the effects of the Hard Rock modifier before playing the Beatmap (check OnBeatmapLoaded(Beatmap)).
Inherited Members
Namespace: MouseDance.Demo
Assembly: MouseDance.Demo.dll
Syntax
public class BasicDemoWithHardRockMain : BasicDemoMain, ISongStartCountdown, IBeatmapEnd, IBeatmapLoaded
Remarks
Note that this is a subclass of BasicDemoMain, so all the callbacks that BasicDemoMain registers will also be done by this subclass (ISongStartCountdown to show a countdown animation, and IBeatmapEnd to show a Results screen afterwards).
Methods
Awake()
Declaration
protected override void Awake()
Overrides
OnBeatmapLoaded(Beatmap)
Called after a beatmap has been loaded (with LoadAndStart, which is called by our parent class BasicDemoMain) but right before the game is actually started. This is used to edit the beatmap that is loaded in memory as much as we want before it is used. We call SetOnBeatmapLoaded(IBeatmapLoaded) before the game is started for this to work.
Declaration
public void OnBeatmapLoaded(Beatmap beatmap)
Parameters
Type | Name | Description |
---|---|---|
OsuParsers.Beatmaps.Beatmap | beatmap | Editable reference to the beatmap. |
Remarks
This is only called once for every beatmap that has just been loaded. It is not called repeatedly on the same beatmap when the song is restarted.