mirror of
https://github.com/ppy/osu.git
synced 2026-05-22 23:00:52 +08:00
HitObject -> HitBase. Also add BaseHits for each game mode.
This commit is contained in:
@@ -10,7 +10,7 @@ namespace osu.Game.Beatmaps
|
||||
{
|
||||
public class Beatmap
|
||||
{
|
||||
public List<HitObject> HitObjects;
|
||||
public List<BaseHit> HitObjects;
|
||||
|
||||
public List<ControlPoint> ControlPoints;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace osu.Game.Beatmaps.Objects
|
||||
/// <summary>
|
||||
/// A hitobject describes a point in a beatmap
|
||||
/// </summary>
|
||||
public class HitObject
|
||||
public abstract class BaseHit
|
||||
{
|
||||
public double StartTime;
|
||||
public double? EndTime;
|
||||
@@ -0,0 +1,11 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
|
||||
namespace osu.Game.Beatmaps.Objects.Catch
|
||||
{
|
||||
class CatchBaseHit : BaseHit
|
||||
{
|
||||
public float Position;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
|
||||
namespace osu.Game.Beatmaps.Objects.Mania
|
||||
{
|
||||
class ManiaBaseHit : BaseHit
|
||||
{
|
||||
public int Column;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using OpenTK;
|
||||
|
||||
namespace osu.Game.Beatmaps.Objects
|
||||
{
|
||||
public abstract class OsuHit : BaseHit
|
||||
{
|
||||
public Vector2 Position;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
|
||||
namespace osu.Game.Beatmaps.Objects.Taiko
|
||||
{
|
||||
class TaikoBaseHit : BaseHit
|
||||
{
|
||||
public bool Big;
|
||||
|
||||
public TaikoColour Type;
|
||||
}
|
||||
|
||||
public enum TaikoColour
|
||||
{
|
||||
Red,
|
||||
Blue
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
//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.Collections.Generic;
|
||||
using osu.Framework.GameModes;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Beatmaps.Objects;
|
||||
|
||||
namespace osu.Game.GameModes.Play
|
||||
{
|
||||
@@ -10,6 +13,14 @@ namespace osu.Game.GameModes.Play
|
||||
public override void Load()
|
||||
{
|
||||
base.Load();
|
||||
|
||||
Beatmap beatmap = new Beatmap();
|
||||
|
||||
beatmap.HitObjects = new List<Beatmaps.Objects.BaseHit>()
|
||||
{
|
||||
new HitObject() { },
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,11 @@
|
||||
<Compile Include="Beatmaps\Beatmap.cs" />
|
||||
<Compile Include="Beatmaps\BeatmapSet.cs" />
|
||||
<Compile Include="Beatmaps\Metadata.cs" />
|
||||
<Compile Include="Beatmaps\Objects\HitObject.cs" />
|
||||
<Compile Include="Beatmaps\Objects\BaseHit.cs" />
|
||||
<Compile Include="Beatmaps\Objects\Catch\CatchBaseHit.cs" />
|
||||
<Compile Include="Beatmaps\Objects\Mania\ManiaBaseHit.cs" />
|
||||
<Compile Include="Beatmaps\Objects\Osu\OsuBaseHit.cs" />
|
||||
<Compile Include="Beatmaps\Objects\Taiko\TaikoBaseHit.cs" />
|
||||
<Compile Include="Beatmaps\Samples\HitSampleInfo.cs" />
|
||||
<Compile Include="Beatmaps\Samples\SampleBank.cs" />
|
||||
<Compile Include="Beatmaps\Samples\SampleInfo.cs" />
|
||||
|
||||
Reference in New Issue
Block a user