Skip to content

Commit

Permalink
Rewrite how swell circle piece is instantiated.
Browse files Browse the repository at this point in the history
  • Loading branch information
smoogipooo committed Mar 29, 2017
1 parent 400a57a commit 37dcc8b
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 51 deletions.
22 changes: 9 additions & 13 deletions osu.Desktop.VisualTests/Tests/TestCaseTaikoHitObjects.cs
Expand Up @@ -62,20 +62,16 @@ public override void Reset()
Position = new Vector2(350, 300)
});

Add(new SwellCirclePiece(new CirclePiece
Add(new CirclePiece
{
KiaiMode = kiai
})
{
Position = new Vector2(100, 500)
});

Add(new SwellCirclePiece(new StrongCirclePiece
{
KiaiMode = kiai
})
{
Position = new Vector2(350, 500)
Position = new Vector2(100, 500),
Width = 0,
AccentColour = Color4.Orange,
KiaiMode = kiai,
Children = new[]
{
new SwellSymbolPiece()
}
});

Add(new DrumRollCircle(new CirclePiece()
Expand Down
11 changes: 10 additions & 1 deletion osu.Game.Modes.Taiko/Objects/Drawable/DrawableSwell.cs
Expand Up @@ -41,6 +41,8 @@ public class DrawableSwell : DrawableTaikoHitObject
private readonly CircularContainer targetRing;
private readonly CircularContainer innerRing;

private readonly CirclePiece circlePiece;

private bool hasStarted;

public DrawableSwell(Swell swell)
Expand Down Expand Up @@ -107,7 +109,13 @@ public DrawableSwell(Swell swell)
}
}
},
new SwellCirclePiece(new CirclePiece())
circlePiece = new CirclePiece
{
Children = new []
{
new SwellSymbolPiece()
}
}
}
}
};
Expand All @@ -116,6 +124,7 @@ public DrawableSwell(Swell swell)
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
circlePiece.AccentColour = colours.YellowDark;
innerRing.Colour = colours.YellowDark;
targetRing.BorderColour = colours.YellowDark.Opacity(0.25f);
}
Expand Down
35 changes: 0 additions & 35 deletions osu.Game.Modes.Taiko/Objects/Drawable/Pieces/SwellCirclePiece.cs

This file was deleted.

23 changes: 23 additions & 0 deletions osu.Game.Modes.Taiko/Objects/Drawable/Pieces/SwellSymbolPiece.cs
@@ -0,0 +1,23 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE

using osu.Game.Graphics;
using osu.Framework.Graphics;

namespace osu.Game.Modes.Taiko.Objects.Drawable.Pieces
{
/// <summary>
/// The symbol used for swell pieces.
/// </summary>
public class SwellSymbolPiece : TextAwesome
{
public SwellSymbolPiece()
{
Anchor = Anchor.Centre;
Origin = Anchor.Centre;
TextSize = CirclePiece.SYMBOL_INNER_SIZE;
Icon = FontAwesome.fa_asterisk;
Shadow = false;
}
}
}
4 changes: 2 additions & 2 deletions osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj
Expand Up @@ -58,9 +58,9 @@
<Compile Include="Objects\Drawable\DrawableDrumRollTick.cs" />
<Compile Include="Objects\Drawable\DrawableSwell.cs" />
<Compile Include="Objects\Drawable\DrawableTaikoHitObject.cs" />
<Compile Include="Objects\Drawable\Pieces\SwellCirclePiece.cs" />
<Compile Include="Objects\Drawable\Pieces\StrongCirclePiece.cs" />
<Compile Include="Objects\Drawable\Pieces\CirclePiece.cs" />
<Compile Include="Objects\Drawable\Pieces\SwellSymbolPiece.cs" />
<Compile Include="Objects\DrumRoll.cs" />
<Compile Include="Objects\DrumRollTick.cs" />
<Compile Include="Objects\Hit.cs" />
Expand Down Expand Up @@ -103,4 +103,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>

0 comments on commit 37dcc8b

Please sign in to comment.