mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Add basic class structure for Beatmap/HitObject/SampleInfo/User.
This commit is contained in:
17
osu.Game/Beatmaps/Beatmap.cs
Normal file
17
osu.Game/Beatmaps/Beatmap.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.Collections.Generic;
|
||||||
|
using osu.Game.Beatmaps.Objects;
|
||||||
|
using osu.Game.Users;
|
||||||
|
|
||||||
|
namespace osu.Game.Beatmaps
|
||||||
|
{
|
||||||
|
public class Beatmap
|
||||||
|
{
|
||||||
|
public List<HitObject> HitObjects;
|
||||||
|
|
||||||
|
public string Difficulty;
|
||||||
|
public User Creator;
|
||||||
|
}
|
||||||
|
}
|
21
osu.Game/Beatmaps/BeatmapSet.cs
Normal file
21
osu.Game/Beatmaps/BeatmapSet.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
//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.Game.Users;
|
||||||
|
|
||||||
|
namespace osu.Game.Beatmaps
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A beatmap set contains multiple beatmap (difficulties).
|
||||||
|
/// </summary>
|
||||||
|
public class BeatmapSet
|
||||||
|
{
|
||||||
|
public List<Beatmap> Beatmaps { get; protected set; }
|
||||||
|
|
||||||
|
public string Artist;
|
||||||
|
public string Title;
|
||||||
|
|
||||||
|
public User Creator;
|
||||||
|
}
|
||||||
|
}
|
18
osu.Game/Beatmaps/Objects/HitObject.cs
Normal file
18
osu.Game/Beatmaps/Objects/HitObject.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 osu.Game.Beatmaps.Samples;
|
||||||
|
|
||||||
|
namespace osu.Game.Beatmaps.Objects
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A hitobject describes a point in a beatmap
|
||||||
|
/// </summary>
|
||||||
|
public class HitObject
|
||||||
|
{
|
||||||
|
public double StartTime;
|
||||||
|
public double? EndTime;
|
||||||
|
|
||||||
|
public SampleInfo Sample;
|
||||||
|
}
|
||||||
|
}
|
12
osu.Game/Beatmaps/Samples/SampleBank.cs
Normal file
12
osu.Game/Beatmaps/Samples/SampleBank.cs
Normal file
@ -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
|
||||||
|
|
||||||
|
namespace osu.Game.Beatmaps.Samples
|
||||||
|
{
|
||||||
|
public enum SampleBank
|
||||||
|
{
|
||||||
|
Default = 0,
|
||||||
|
Custom1 = 1,
|
||||||
|
Custom2 = 2
|
||||||
|
}
|
||||||
|
}
|
11
osu.Game/Beatmaps/Samples/SampleInfo.cs
Normal file
11
osu.Game/Beatmaps/Samples/SampleInfo.cs
Normal file
@ -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.Samples
|
||||||
|
{
|
||||||
|
public class SampleInfo
|
||||||
|
{
|
||||||
|
public SampleBank Bank;
|
||||||
|
public SampleSet Set;
|
||||||
|
}
|
||||||
|
}
|
13
osu.Game/Beatmaps/Samples/SampleSet.cs
Normal file
13
osu.Game/Beatmaps/Samples/SampleSet.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
//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 enum SampleSet
|
||||||
|
{
|
||||||
|
None = 0,
|
||||||
|
Normal = 1,
|
||||||
|
Soft = 2,
|
||||||
|
Drum = 3
|
||||||
|
}
|
||||||
|
}
|
28
osu.Game/Graphics/Components/FpsDisplay.cs
Normal file
28
osu.Game/Graphics/Components/FpsDisplay.cs
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Game.Graphics.Containers;
|
||||||
|
|
||||||
|
namespace osu.Game.Graphics.Components
|
||||||
|
{
|
||||||
|
class FpsDisplay : OsuComponent
|
||||||
|
{
|
||||||
|
SpriteText fpsText;
|
||||||
|
public override void Load()
|
||||||
|
{
|
||||||
|
base.Load();
|
||||||
|
|
||||||
|
Add(fpsText = new SpriteText());
|
||||||
|
|
||||||
|
fpsText.Text = "...";
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Update()
|
||||||
|
{
|
||||||
|
fpsText.Text = ((int)(1000 / Clock.ElapsedFrameTime)).ToString();
|
||||||
|
base.Update();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
17
osu.Game/Users/User.cs
Normal file
17
osu.Game/Users/User.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;
|
||||||
|
|
||||||
|
namespace osu.Game.Users
|
||||||
|
{
|
||||||
|
public class User
|
||||||
|
{
|
||||||
|
public int Id;
|
||||||
|
public string Username;
|
||||||
|
}
|
||||||
|
}
|
@ -45,6 +45,12 @@
|
|||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Include="Beatmaps\Beatmap.cs" />
|
||||||
|
<Compile Include="Beatmaps\BeatmapSet.cs" />
|
||||||
|
<Compile Include="Beatmaps\Objects\HitObject.cs" />
|
||||||
|
<Compile Include="Beatmaps\Samples\SampleBank.cs" />
|
||||||
|
<Compile Include="Beatmaps\Samples\SampleInfo.cs" />
|
||||||
|
<Compile Include="Beatmaps\Samples\SampleSet.cs" />
|
||||||
<Compile Include="Configuration\OsuConfigManager.cs" />
|
<Compile Include="Configuration\OsuConfigManager.cs" />
|
||||||
<Compile Include="GameModes\FontTest.cs" />
|
<Compile Include="GameModes\FontTest.cs" />
|
||||||
<Compile Include="GameModes\Menu\ButtonSystem.cs" />
|
<Compile Include="GameModes\Menu\ButtonSystem.cs" />
|
||||||
@ -68,6 +74,7 @@
|
|||||||
<Compile Include="Online\Chat\Message.cs" />
|
<Compile Include="Online\Chat\Message.cs" />
|
||||||
<Compile Include="OsuGame.cs" />
|
<Compile Include="OsuGame.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="Users\User.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\osu-framework\osu.Framework\osu.Framework.csproj">
|
<ProjectReference Include="..\osu-framework\osu.Framework\osu.Framework.csproj">
|
||||||
|
Reference in New Issue
Block a user