1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 19:42:56 +08:00

HitObjectType -> LegacyHitObjectType, move to Legacy namespace.

This commit is contained in:
smoogipooo 2017-03-15 19:39:40 +09:00
parent ae7547bbda
commit 76c0a4d836
3 changed files with 10 additions and 10 deletions

View File

@ -3,10 +3,10 @@
using System; using System;
namespace osu.Game.Modes.Objects.Types namespace osu.Game.Modes.Objects.Legacy
{ {
[Flags] [Flags]
public enum HitObjectType public enum LegacyHitObjectType
{ {
Circle = 1 << 0, Circle = 1 << 0,
Slider = 1 << 1, Slider = 1 << 1,

View File

@ -16,13 +16,13 @@ namespace osu.Game.Modes.Objects
public override HitObject Parse(string text) public override HitObject Parse(string text)
{ {
string[] split = text.Split(','); string[] split = text.Split(',');
var type = (HitObjectType)int.Parse(split[3]) & ~HitObjectType.ColourHax; var type = (LegacyHitObjectType)int.Parse(split[3]) & ~LegacyHitObjectType.ColourHax;
bool combo = type.HasFlag(HitObjectType.NewCombo); bool combo = type.HasFlag(LegacyHitObjectType.NewCombo);
type &= ~HitObjectType.NewCombo; type &= ~LegacyHitObjectType.NewCombo;
HitObject result; HitObject result;
if ((type & HitObjectType.Circle) > 0) if ((type & LegacyHitObjectType.Circle) > 0)
{ {
result = new LegacyHit result = new LegacyHit
{ {
@ -30,7 +30,7 @@ namespace osu.Game.Modes.Objects
NewCombo = combo NewCombo = combo
}; };
} }
else if ((type & HitObjectType.Slider) > 0) else if ((type & LegacyHitObjectType.Slider) > 0)
{ {
CurveType curveType = CurveType.Catmull; CurveType curveType = CurveType.Catmull;
double length = 0; double length = 0;
@ -85,14 +85,14 @@ namespace osu.Game.Modes.Objects
NewCombo = combo NewCombo = combo
}; };
} }
else if ((type & HitObjectType.Spinner) > 0) else if ((type & LegacyHitObjectType.Spinner) > 0)
{ {
result = new LegacySpinner result = new LegacySpinner
{ {
EndTime = Convert.ToDouble(split[5], CultureInfo.InvariantCulture) EndTime = Convert.ToDouble(split[5], CultureInfo.InvariantCulture)
}; };
} }
else if ((type & HitObjectType.Hold) > 0) else if ((type & LegacyHitObjectType.Hold) > 0)
{ {
// Note: Hold is generated by BMS converts // Note: Hold is generated by BMS converts
result = new LegacyHold result = new LegacyHold

View File

@ -113,7 +113,7 @@
<Compile Include="Modes\Objects\Types\IHasRepeats.cs" /> <Compile Include="Modes\Objects\Types\IHasRepeats.cs" />
<Compile Include="Modes\Objects\Types\IHasPosition.cs" /> <Compile Include="Modes\Objects\Types\IHasPosition.cs" />
<Compile Include="Modes\Objects\Types\IHasSpecial.cs" /> <Compile Include="Modes\Objects\Types\IHasSpecial.cs" />
<Compile Include="Modes\Objects\Types\LegacyHitObjectType.cs" /> <Compile Include="Modes\Objects\Legacy\LegacyHitObjectType.cs" />
<Compile Include="Modes\Replay.cs" /> <Compile Include="Modes\Replay.cs" />
<Compile Include="Modes\Score.cs" /> <Compile Include="Modes\Score.cs" />
<Compile Include="Modes\ScoreProcesssor.cs" /> <Compile Include="Modes\ScoreProcesssor.cs" />