fix crash and add some tests
- still missing special skin textures
BIN
osu.Game.Rulesets.Osu.Tests/Resources/default-skin/hit0@2x.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
osu.Game.Rulesets.Osu.Tests/Resources/default-skin/hit100@2x.png
Normal file
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 21 KiB |
BIN
osu.Game.Rulesets.Osu.Tests/Resources/default-skin/hit300@2x.png
Normal file
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 39 KiB |
BIN
osu.Game.Rulesets.Osu.Tests/Resources/default-skin/hit50@2x.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
osu.Game.Rulesets.Osu.Tests/Resources/metrics-skin/hit0@2x.PNG
Normal file
After Width: | Height: | Size: 9.3 KiB |
BIN
osu.Game.Rulesets.Osu.Tests/Resources/metrics-skin/hit100@2x.PNG
Normal file
After Width: | Height: | Size: 8.2 KiB |
BIN
osu.Game.Rulesets.Osu.Tests/Resources/metrics-skin/hit300@2x.PNG
Normal file
After Width: | Height: | Size: 9.4 KiB |
BIN
osu.Game.Rulesets.Osu.Tests/Resources/metrics-skin/hit50@2x.PNG
Normal file
After Width: | Height: | Size: 9.1 KiB |
39
osu.Game.Rulesets.Osu.Tests/TestSceneDrawableJudgement.cs
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using osu.Framework.Extensions;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Game.Rulesets.Judgements;
|
||||||
|
using osu.Game.Rulesets.Osu.Objects.Drawables;
|
||||||
|
using osu.Game.Rulesets.Scoring;
|
||||||
|
|
||||||
|
namespace osu.Game.Rulesets.Osu.Tests
|
||||||
|
{
|
||||||
|
public class TestSceneDrawableJudgement : SkinnableTestScene
|
||||||
|
{
|
||||||
|
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||||
|
{
|
||||||
|
typeof(DrawableJudgement),
|
||||||
|
typeof(DrawableOsuJudgement)
|
||||||
|
};
|
||||||
|
|
||||||
|
public TestSceneDrawableJudgement()
|
||||||
|
{
|
||||||
|
foreach (HitResult result in Enum.GetValues(typeof(HitResult)))
|
||||||
|
{
|
||||||
|
JudgementResult judgement = new JudgementResult(null)
|
||||||
|
{
|
||||||
|
Type = result,
|
||||||
|
};
|
||||||
|
|
||||||
|
AddStep("Show " + result.GetDescription(), () => SetContents(() => new DrawableOsuJudgement(judgement, null)
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -140,7 +140,7 @@ namespace osu.Game.Skinning
|
|||||||
|
|
||||||
if (texture != null && animatable)
|
if (texture != null && animatable)
|
||||||
{
|
{
|
||||||
var animation = new TextureAnimation { DefaultFrameLength = frametime };
|
var animation = new TextureAnimation { DefaultFrameLength = frametime, AutoSizeAxes = Axes.None };
|
||||||
|
|
||||||
for (int i = 1; texture != null; i++)
|
for (int i = 1; texture != null; i++)
|
||||||
{
|
{
|
||||||
|