mirror of https://github.com/ppy/osu
Rename classes to better emphasise that `Smoke` is a single trail segment
This commit is contained in:
parent
04abb2ce8f
commit
1e5ff2679b
|
@ -21,7 +21,7 @@ public enum OsuSkinComponents
|
|||
SliderBall,
|
||||
SliderBody,
|
||||
SpinnerBody,
|
||||
Smoke,
|
||||
SmokeTrail,
|
||||
ApproachCircle,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
namespace osu.Game.Rulesets.Osu.Skinning.Default
|
||||
{
|
||||
public class DefaultSmoke : Smoke
|
||||
public class DefaultSmokeSegment : SmokeSegment
|
||||
{
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(TextureStore textures)
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
||||
{
|
||||
public class LegacySmoke : Smoke
|
||||
public class LegacySmokeSegment : SmokeSegment
|
||||
{
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(ISkinSource skin)
|
|
@ -106,9 +106,9 @@ public override Drawable GetDrawableComponent(ISkinComponent component)
|
|||
|
||||
return null;
|
||||
|
||||
case OsuSkinComponents.Smoke:
|
||||
case OsuSkinComponents.SmokeTrail:
|
||||
if (GetTexture("cursor-smoke") != null)
|
||||
return new LegacySmoke();
|
||||
return new LegacySmokeSegment();
|
||||
|
||||
return null;
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
namespace osu.Game.Rulesets.Osu.Skinning
|
||||
{
|
||||
public abstract class Smoke : Drawable, ITexturedShaderDrawable
|
||||
public abstract class SmokeSegment : Drawable, ITexturedShaderDrawable
|
||||
{
|
||||
public IShader? TextureShader { get; private set; }
|
||||
public IShader? RoundedTextureShader { get; private set; }
|
||||
|
@ -214,7 +214,7 @@ public int Compare(SmokePoint x, SmokePoint target)
|
|||
|
||||
protected class SmokeDrawNode : TexturedShaderDrawNode
|
||||
{
|
||||
protected new Smoke Source => (Smoke)base.Source;
|
||||
protected new SmokeSegment Source => (SmokeSegment)base.Source;
|
||||
|
||||
protected double SmokeStartTime { get; private set; }
|
||||
protected double SmokeEndTime { get; private set; }
|
|
@ -14,6 +14,9 @@
|
|||
|
||||
namespace osu.Game.Rulesets.Osu.UI
|
||||
{
|
||||
/// <summary>
|
||||
/// Manages smoke trails generated from user input.
|
||||
/// </summary>
|
||||
[Cached]
|
||||
public class SmokeContainer : Container, IRequireHighFrequencyMousePosition, IKeyBindingHandler<OsuAction>
|
||||
{
|
||||
|
@ -31,7 +34,7 @@ public bool OnPressed(KeyBindingPressEvent<OsuAction> e)
|
|||
if (e.Action == OsuAction.Smoke)
|
||||
{
|
||||
isSmoking = true;
|
||||
AddInternal(new SkinnableDrawable(new OsuSkinComponent(OsuSkinComponents.Smoke), _ => new DefaultSmoke()));
|
||||
AddInternal(new SkinnableDrawable(new OsuSkinComponent(OsuSkinComponents.SmokeTrail), _ => new DefaultSmokeSegment()));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue