mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Privatise the OsuGame beatmap, add local beatmap to OsuTestCase
This commit is contained in:
@ -7,6 +7,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Animations;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
using System.Linq;
|
||||
using osu.Game.Beatmaps;
|
||||
|
||||
namespace osu.Game.Storyboards.Drawables
|
||||
{
|
||||
@ -63,14 +64,14 @@ namespace osu.Game.Storyboards.Drawables
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuGameBase game, TextureStore textureStore)
|
||||
private void load(IGameBeatmap beatmap, TextureStore textureStore)
|
||||
{
|
||||
var basePath = Animation.Path.ToLowerInvariant();
|
||||
for (var frame = 0; frame < Animation.FrameCount; frame++)
|
||||
{
|
||||
var framePath = basePath.Replace(".", frame + ".");
|
||||
|
||||
var path = game.Beatmap.Value.BeatmapSetInfo.Files.FirstOrDefault(f => f.Filename.ToLowerInvariant() == framePath)?.FileInfo.StoragePath;
|
||||
var path = beatmap.Value.BeatmapSetInfo.Files.FirstOrDefault(f => f.Filename.ToLowerInvariant() == framePath)?.FileInfo.StoragePath;
|
||||
if (path == null)
|
||||
continue;
|
||||
|
||||
|
@ -7,6 +7,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
using System.Linq;
|
||||
using osu.Game.Beatmaps;
|
||||
|
||||
namespace osu.Game.Storyboards.Drawables
|
||||
{
|
||||
@ -62,10 +63,10 @@ namespace osu.Game.Storyboards.Drawables
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuGameBase game, TextureStore textureStore)
|
||||
private void load(IGameBeatmap beatmap, TextureStore textureStore)
|
||||
{
|
||||
var spritePath = Sprite.Path.ToLowerInvariant();
|
||||
var path = game.Beatmap.Value.BeatmapSetInfo.Files.FirstOrDefault(f => f.Filename.ToLowerInvariant() == spritePath)?.FileInfo.StoragePath;
|
||||
var path = beatmap.Value.BeatmapSetInfo.Files.FirstOrDefault(f => f.Filename.ToLowerInvariant() == spritePath)?.FileInfo.StoragePath;
|
||||
if (path == null)
|
||||
return;
|
||||
|
||||
|
Reference in New Issue
Block a user