mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 06:36:31 +09:00
Make fruit catcher enter and leave what's behind the blinds
This commit is contained in:
@ -6,7 +6,6 @@ using osu.Game.Rulesets.Osu.Objects;
|
||||
using osu.Game.Rulesets.Osu.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Rulesets.UI;
|
||||
using System.Linq;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Mods
|
||||
{
|
||||
@ -17,8 +16,16 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
|
||||
public override void ApplyToRulesetContainer(RulesetContainer<OsuHitObject> rulesetContainer)
|
||||
{
|
||||
bool hasEasy = rulesetContainer.ActiveMods.Count(mod => mod is ModEasy) > 0;
|
||||
rulesetContainer.Overlays.Add(flashlight = new DrawableOsuBlinds(restrictTo: rulesetContainer.Playfield, hasEasy: hasEasy));
|
||||
bool hasEasy = false;
|
||||
bool hasHardrock = false;
|
||||
foreach (var mod in rulesetContainer.ActiveMods)
|
||||
{
|
||||
if (mod is ModEasy)
|
||||
hasEasy = true;
|
||||
if (mod is ModHardRock)
|
||||
hasHardrock = true;
|
||||
}
|
||||
rulesetContainer.Overlays.Add(flashlight = new DrawableOsuBlinds(restrictTo: rulesetContainer.Playfield, hasEasy: hasEasy, hasHardrock: hasHardrock));
|
||||
}
|
||||
|
||||
public override void ApplyToScoreProcessor(ScoreProcessor scoreProcessor)
|
||||
@ -26,6 +33,10 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
scoreProcessor.Health.ValueChanged += val => {
|
||||
flashlight.Value = (float)val;
|
||||
};
|
||||
scoreProcessor.Combo.ValueChanged += val => {
|
||||
if (val > 0 && val % 30 == 0)
|
||||
flashlight.TriggerNPC();
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user