mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 08:32:57 +08:00
Add more timing and sample related classes.
This commit is contained in:
parent
3098204dda
commit
abe8ff21f6
@ -3,6 +3,7 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using osu.Game.Beatmaps.Objects;
|
||||
using osu.Game.Beatmaps.Timing;
|
||||
using osu.Game.Users;
|
||||
|
||||
namespace osu.Game.Beatmaps
|
||||
@ -11,6 +12,8 @@ namespace osu.Game.Beatmaps
|
||||
{
|
||||
public List<HitObject> HitObjects;
|
||||
|
||||
public List<ControlPoint> ControlPoints;
|
||||
|
||||
public string Difficulty;
|
||||
public User Creator;
|
||||
}
|
||||
|
@ -13,6 +13,6 @@ namespace osu.Game.Beatmaps.Objects
|
||||
public double StartTime;
|
||||
public double? EndTime;
|
||||
|
||||
public SampleInfo Sample;
|
||||
public HitSampleInfo Sample;
|
||||
}
|
||||
}
|
||||
|
10
osu.Game/Beatmaps/Samples/HitSampleInfo.cs
Normal file
10
osu.Game/Beatmaps/Samples/HitSampleInfo.cs
Normal file
@ -0,0 +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
|
||||
|
||||
namespace osu.Game.Beatmaps.Samples
|
||||
{
|
||||
public class HitSampleInfo : SampleInfo
|
||||
{
|
||||
SampleType Type;
|
||||
}
|
||||
}
|
17
osu.Game/Beatmaps/Samples/SampleType.cs
Normal file
17
osu.Game/Beatmaps/Samples/SampleType.cs
Normal file
@ -0,0 +1,17 @@
|
||||
//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;
|
||||
|
||||
namespace osu.Game.Beatmaps.Samples
|
||||
{
|
||||
[Flags]
|
||||
public enum SampleType
|
||||
{
|
||||
None = 0,
|
||||
Normal = 1,
|
||||
Whistle = 2,
|
||||
Finish = 4,
|
||||
Clap = 8
|
||||
};
|
||||
}
|
16
osu.Game/Beatmaps/Timing/ControlPoint.cs
Normal file
16
osu.Game/Beatmaps/Timing/ControlPoint.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.Beatmaps.Timing
|
||||
{
|
||||
public class ControlPoint
|
||||
{
|
||||
public double Time;
|
||||
}
|
||||
}
|
17
osu.Game/Beatmaps/Timing/SampleChange.cs
Normal file
17
osu.Game/Beatmaps/Timing/SampleChange.cs
Normal file
@ -0,0 +1,17 @@
|
||||
//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;
|
||||
using osu.Game.Beatmaps.Samples;
|
||||
|
||||
namespace osu.Game.Beatmaps.Timing
|
||||
{
|
||||
class SampleChange : ControlPoint
|
||||
{
|
||||
public SampleInfo Sample;
|
||||
}
|
||||
}
|
18
osu.Game/Beatmaps/Timing/TimingChange.cs
Normal file
18
osu.Game/Beatmaps/Timing/TimingChange.cs
Normal file
@ -0,0 +1,18 @@
|
||||
//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.Beatmaps.Timing
|
||||
{
|
||||
class TimingChange : ControlPoint
|
||||
{
|
||||
public double BeatLength;
|
||||
|
||||
public double BPM => 60000 / BeatLength;
|
||||
}
|
||||
}
|
@ -48,9 +48,14 @@
|
||||
<Compile Include="Beatmaps\Beatmap.cs" />
|
||||
<Compile Include="Beatmaps\BeatmapSet.cs" />
|
||||
<Compile Include="Beatmaps\Objects\HitObject.cs" />
|
||||
<Compile Include="Beatmaps\Samples\HitSampleInfo.cs" />
|
||||
<Compile Include="Beatmaps\Samples\SampleBank.cs" />
|
||||
<Compile Include="Beatmaps\Samples\SampleInfo.cs" />
|
||||
<Compile Include="Beatmaps\Samples\SampleSet.cs" />
|
||||
<Compile Include="Beatmaps\Samples\SampleType.cs" />
|
||||
<Compile Include="Beatmaps\Timing\ControlPoint.cs" />
|
||||
<Compile Include="Beatmaps\Timing\SampleChange.cs" />
|
||||
<Compile Include="Beatmaps\Timing\TimingChange.cs" />
|
||||
<Compile Include="Configuration\OsuConfigManager.cs" />
|
||||
<Compile Include="GameModes\FontTest.cs" />
|
||||
<Compile Include="GameModes\Menu\ButtonSystem.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user