1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:20:04 +08:00

Hyperdash preparation

This commit is contained in:
Dean Herbert 2017-11-28 21:22:57 +09:00
parent dddd432dc8
commit 76a1c7db3b
4 changed files with 72 additions and 0 deletions

View File

@ -1,6 +1,7 @@
// Copyright (c) 2007-2017 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;
using osu.Game.Rulesets.Catch.Objects;
@ -18,6 +19,8 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
CatchHitObject lastObj = null;
convertHyperDash(beatmap.HitObjects);
foreach (var obj in beatmap.HitObjects)
{
if (obj.NewCombo)
@ -34,5 +37,10 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
lastObj = obj;
}
}
private void convertHyperDash(List<CatchHitObject> objects)
{
}
}
}

View File

@ -0,0 +1,36 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Rulesets.Catch.Objects;
using osu.Game.Rulesets.Catch.Objects.Drawable;
using osu.Game.Tests.Visual;
using OpenTK;
namespace osu.Game.Rulesets.Catch.Tests
{
public class TestCaseFruit : OsuTestCase
{
public TestCaseFruit()
{
Add(new GridContainer
{
RelativeSizeAxes = Axes.Both,
Content = new[]
{
new Drawable[]
{
new DrawableFruit(new Fruit()) { Position = new Vector2(0.5f) },
new DrawableFruit(new Fruit()) { Position = new Vector2(0.5f) },
},
new Drawable[]
{
new DrawableFruit(new Fruit()) { Position = new Vector2(0.5f) },
new DrawableFruit(new Fruit()) { Position = new Vector2(0.5f) },
}
}
});
}
}
}

View File

@ -0,0 +1,26 @@
using NUnit.Framework;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Catch.Objects;
namespace osu.Game.Rulesets.Catch.Tests
{
[TestFixture]
[Ignore("getting CI working")]
public class TestCaseHyperdash : Game.Tests.Visual.TestCasePlayer
{
public TestCaseHyperdash()
: base(typeof(CatchRuleset))
{
}
protected override Beatmap CreateBeatmap()
{
var beatmap = new Beatmap();
for (int i = 0; i < 512; i++)
beatmap.HitObjects.Add(new Fruit { X = 0.5f + (i % 2 == 0 ? -0.4f : 0.4f), StartTime = i * 100, NewCombo = i % 8 == 0 });
return beatmap;
}
}
}

View File

@ -67,6 +67,8 @@
<Compile Include="Tests\TestCaseCatchStacker.cs" />
<Compile Include="Tests\TestCasePerformancePoints.cs" />
<Compile Include="Tests\TestCaseCatchPlayer.cs" />
<Compile Include="Tests\TestCaseFruit.cs" />
<Compile Include="Tests\TestCaseHyperdash.cs" />
<Compile Include="UI\CatcherArea.cs" />
<Compile Include="UI\CatchRulesetContainer.cs" />
<Compile Include="UI\CatchPlayfield.cs" />