1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 23:52:57 +08:00

disable hit explotion when hit lighting off

This commit is contained in:
Gagah Pangeran 2020-07-14 10:35:01 +07:00
parent e0d9e70404
commit a25f4880d6

View File

@ -11,6 +11,7 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Input.Bindings;
using osu.Framework.Utils;
using osu.Game.Beatmaps;
using osu.Game.Configuration;
using osu.Game.Rulesets.Catch.Objects;
using osu.Game.Rulesets.Catch.Objects.Drawables;
using osu.Game.Rulesets.Catch.Skinning;
@ -99,6 +100,7 @@ namespace osu.Game.Rulesets.Catch.UI
private double hyperDashModifier = 1;
private int hyperDashDirection;
private float hyperDashTargetPosition;
private bool hitLighting;
public Catcher([NotNull] Container trailsTarget, BeatmapDifficulty difficulty = null)
{
@ -114,8 +116,10 @@ namespace osu.Game.Rulesets.Catch.UI
}
[BackgroundDependencyLoader]
private void load()
private void load(OsuConfigManager config)
{
hitLighting = config.Get<bool>(OsuSetting.HitLighting);
InternalChildren = new Drawable[]
{
caughtFruit = new Container<DrawableHitObject>
@ -189,11 +193,14 @@ namespace osu.Game.Rulesets.Catch.UI
caughtFruit.Add(fruit);
AddInternal(new HitExplosion(fruit)
if (hitLighting)
{
X = fruit.X,
Scale = new Vector2(fruit.HitObject.Scale)
});
AddInternal(new HitExplosion(fruit)
{
X = fruit.X,
Scale = new Vector2(fruit.HitObject.Scale)
});
}
}
/// <summary>