mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Introduce concept of HitObjectParsers, fix tests and stop using reflection (unreliable due to lazy loading).
This commit is contained in:
@ -21,17 +21,5 @@ namespace osu.Game.Modes.Objects
|
||||
public double Duration => EndTime - StartTime;
|
||||
|
||||
public HitSampleInfo Sample;
|
||||
|
||||
public static HitObject Parse(PlayMode mode, string val)
|
||||
{
|
||||
//TODO: move to modular HitObjectParser system rather than static parsing. (https://github.com/ppy/osu/pull/60/files#r83135780)
|
||||
switch (mode)
|
||||
{
|
||||
case PlayMode.Osu:
|
||||
return null; //return OsuBaseHit.Parse(val);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
16
osu.Game/Modes/Objects/HitObjectParser.cs
Normal file
16
osu.Game/Modes/Objects/HitObjectParser.cs
Normal file
@ -0,0 +1,16 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace osu.Game.Modes.Objects
|
||||
{
|
||||
public abstract class HitObjectParser
|
||||
{
|
||||
public abstract HitObject Parse(string text);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user