1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 09:23:06 +08:00

Fix hold notes - remove glow for now.

# Conflicts:
#	osu.Game.Rulesets.Mania/Objects/Drawables/DrawableHoldNote.cs
#	osu.Game.Rulesets.Mania/Objects/Drawables/DrawableManiaHitObject.cs
This commit is contained in:
smoogipooo 2017-05-12 19:10:26 +09:00
parent 17466a662c
commit 9565bb9572
5 changed files with 17 additions and 40 deletions

View File

@ -43,13 +43,8 @@ namespace osu.Desktop.VisualTests.Tests
RelativeCoordinateSpace = new Vector2(1, 10000),
Children = new[]
{
new DrawableNote(new Note
{
StartTime = 5000
})
{
AccentColour = Color4.Red
}
new DrawableNote(new Note { StartTime = 5000 }) { AccentColour = Color4.Red },
new DrawableNote(new Note { StartTime = 6000 }) { AccentColour = Color4.Red }
}
}
}
@ -74,10 +69,7 @@ namespace osu.Desktop.VisualTests.Tests
{
StartTime = 5000,
Duration = 1000
})
{
AccentColour = Color4.Red
}
}) { AccentColour = Color4.Red }
}
}
}

View File

@ -61,5 +61,16 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
protected override void UpdateState(ArmedState state)
{
}
protected override void Update()
{
if (Time.Current > HitObject.StartTime)
headPiece.Colour = Color4.Green;
if (Time.Current > HitObject.EndTime)
{
bodyPiece.Colour = Color4.Green;
tailPiece.Colour = Color4.Green;
}
}
}
}

View File

@ -3,8 +3,6 @@
using OpenTK.Graphics;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Game.Rulesets.Mania.Judgements;
using osu.Game.Rulesets.Objects.Drawables;
@ -15,8 +13,6 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
{
public new TObject HitObject;
private readonly Container glowContainer;
protected DrawableManiaHitObject(TObject hitObject)
: base(hitObject)
{
@ -24,21 +20,6 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
RelativePositionAxes = Axes.Y;
Y = (float)HitObject.StartTime;
Add(glowContainer = new Container
{
RelativeSizeAxes = Axes.Both,
Masking = true,
Children = new[]
{
new Box
{
RelativeSizeAxes = Axes.Both,
Alpha = 0,
AlwaysPresent = true
}
}
});
}
public override Color4 AccentColour
@ -49,13 +30,6 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
if (base.AccentColour == value)
return;
base.AccentColour = value;
glowContainer.EdgeEffect = new EdgeEffect
{
Type = EdgeEffectType.Glow,
Radius = 5,
Colour = value
};
}
}

View File

@ -19,7 +19,6 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables.Pieces
public BodyPiece()
{
RelativeSizeAxes = Axes.Both;
Masking = true;
Children = new[]
{

View File

@ -145,8 +145,9 @@ namespace osu.Game.Rulesets.Objects.Legacy
if (split.Length > 5 && !string.IsNullOrEmpty(split[5]))
{
endTime = Convert.ToDouble(split[0], CultureInfo.InvariantCulture);
readCustomSampleBanks(string.Join(":", split.Skip(1)), bankInfo);
string[] ss = split[5].Split(':');
endTime = Convert.ToDouble(ss[0], CultureInfo.InvariantCulture);
readCustomSampleBanks(string.Join(":", ss.Skip(1)), bankInfo);
}
result = CreateHold(new Vector2(int.Parse(split[0]), int.Parse(split[1])), combo, endTime);