mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 16:03:01 +08:00
HitObjectType -> LegacyHitObjectType, move to Legacy namespace.
This commit is contained in:
parent
ae7547bbda
commit
76c0a4d836
@ -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,
|
@ -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
|
||||
|
@ -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" />
|
||||
|
Loading…
Reference in New Issue
Block a user