1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 10:42:55 +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;
namespace osu.Game.Modes.Objects.Types
namespace osu.Game.Modes.Objects.Legacy
{
[Flags]
public enum HitObjectType
public enum LegacyHitObjectType
{
Circle = 1 << 0,
Slider = 1 << 1,

View File

@ -16,13 +16,13 @@ namespace osu.Game.Modes.Objects
public override HitObject Parse(string text)
{
string[] split = text.Split(',');
var type = (HitObjectType)int.Parse(split[3]) & ~HitObjectType.ColourHax;
bool combo = type.HasFlag(HitObjectType.NewCombo);
type &= ~HitObjectType.NewCombo;
var type = (LegacyHitObjectType)int.Parse(split[3]) & ~LegacyHitObjectType.ColourHax;
bool combo = type.HasFlag(LegacyHitObjectType.NewCombo);
type &= ~LegacyHitObjectType.NewCombo;
HitObject result;
if ((type & HitObjectType.Circle) > 0)
if ((type & LegacyHitObjectType.Circle) > 0)
{
result = new LegacyHit
{
@ -30,7 +30,7 @@ namespace osu.Game.Modes.Objects
NewCombo = combo
};
}
else if ((type & HitObjectType.Slider) > 0)
else if ((type & LegacyHitObjectType.Slider) > 0)
{
CurveType curveType = CurveType.Catmull;
double length = 0;
@ -85,14 +85,14 @@ namespace osu.Game.Modes.Objects
NewCombo = combo
};
}
else if ((type & HitObjectType.Spinner) > 0)
else if ((type & LegacyHitObjectType.Spinner) > 0)
{
result = new LegacySpinner
{
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
result = new LegacyHold

View File

@ -113,7 +113,7 @@
<Compile Include="Modes\Objects\Types\IHasRepeats.cs" />
<Compile Include="Modes\Objects\Types\IHasPosition.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\Score.cs" />
<Compile Include="Modes\ScoreProcesssor.cs" />