mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 22:22:55 +08:00
Merge branch 'master' into taiko_note_circle
This commit is contained in:
commit
ac2d36da3b
@ -1 +1 @@
|
||||
Subproject commit 06e426da039f7bb54aedf5d82c21b8d858a0310e
|
||||
Subproject commit 51737ec1320b4ea9dce4978f24e1d77a28f0a98e
|
27
osu.Desktop.VisualTests/Tests/TestCaseBeatmapDetailArea.cs
Normal file
27
osu.Desktop.VisualTests/Tests/TestCaseBeatmapDetailArea.cs
Normal file
@ -0,0 +1,27 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using OpenTK;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Screens.Testing;
|
||||
using osu.Game.Screens.Select;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
internal class TestCaseBeatmapDetailArea : TestCase
|
||||
{
|
||||
public override string Description => @"Beatmap details in song select";
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
base.Reset();
|
||||
|
||||
Add(new BeatmapDetailArea
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Size = new Vector2(550f, 450f),
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
@ -136,7 +136,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
if (auto)
|
||||
{
|
||||
h.State = ArmedState.Hit;
|
||||
h.Judgement = new OsuJudgementInfo { Result = HitResult.Hit };
|
||||
h.Judgement = new OsuJudgement { Result = HitResult.Hit };
|
||||
}
|
||||
|
||||
playfieldContainer.Add(h);
|
||||
|
@ -4,9 +4,9 @@
|
||||
using OpenTK;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Screens.Testing;
|
||||
using osu.Game.Modes;
|
||||
using osu.Game.Modes.Mods;
|
||||
using osu.Game.Modes.Osu.Mods;
|
||||
using osu.Game.Modes.Scoring;
|
||||
using osu.Game.Screens.Select.Leaderboards;
|
||||
using osu.Game.Users;
|
||||
|
||||
|
77
osu.Desktop.VisualTests/Tests/TestCaseTaikoPlayfield.cs
Normal file
77
osu.Desktop.VisualTests/Tests/TestCaseTaikoPlayfield.cs
Normal file
@ -0,0 +1,77 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.MathUtils;
|
||||
using osu.Framework.Screens.Testing;
|
||||
using osu.Game.Modes.Objects.Drawables;
|
||||
using osu.Game.Modes.Taiko.Judgements;
|
||||
using osu.Game.Modes.Taiko.Objects;
|
||||
using osu.Game.Modes.Taiko.UI;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
internal class TestCaseTaikoPlayfield : TestCase
|
||||
{
|
||||
public override string Description => "Taiko playfield";
|
||||
|
||||
private TaikoPlayfield playfield;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
base.Reset();
|
||||
|
||||
AddButton("Hit!", addHitJudgement);
|
||||
AddButton("Miss :(", addMissJudgement);
|
||||
|
||||
Add(playfield = new TaikoPlayfield
|
||||
{
|
||||
Y = 200
|
||||
});
|
||||
}
|
||||
|
||||
private void addHitJudgement()
|
||||
{
|
||||
TaikoHitResult hitResult = RNG.Next(2) == 0 ? TaikoHitResult.Good : TaikoHitResult.Great;
|
||||
|
||||
playfield.OnJudgement(new DrawableTestHit(new Hit())
|
||||
{
|
||||
X = RNG.NextSingle(hitResult == TaikoHitResult.Good ? -0.1f : -0.05f, hitResult == TaikoHitResult.Good ? 0.1f : 0.05f),
|
||||
Judgement = new TaikoJudgement
|
||||
{
|
||||
Result = HitResult.Hit,
|
||||
TaikoResult = hitResult,
|
||||
TimeOffset = 0,
|
||||
ComboAtHit = 1,
|
||||
SecondHit = RNG.Next(10) == 0
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void addMissJudgement()
|
||||
{
|
||||
playfield.OnJudgement(new DrawableTestHit(new Hit())
|
||||
{
|
||||
Judgement = new TaikoJudgement
|
||||
{
|
||||
Result = HitResult.Miss,
|
||||
TimeOffset = 0,
|
||||
ComboAtHit = 0
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private class DrawableTestHit : DrawableHitObject<TaikoHitObject, TaikoJudgement>
|
||||
{
|
||||
public DrawableTestHit(TaikoHitObject hitObject)
|
||||
: base(hitObject)
|
||||
{
|
||||
}
|
||||
|
||||
protected override TaikoJudgement CreateJudgement() => new TaikoJudgement();
|
||||
|
||||
protected override void UpdateState(ArmedState state)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -195,6 +195,7 @@
|
||||
<Compile Include="Tests\TestCaseScoreCounter.cs" />
|
||||
<Compile Include="Tests\TestCaseTabControl.cs" />
|
||||
<Compile Include="Tests\TestCaseTaikoHitObjects.cs" />
|
||||
<Compile Include="Tests\TestCaseTaikoPlayfield.cs" />
|
||||
<Compile Include="Tests\TestCaseTextAwesome.cs" />
|
||||
<Compile Include="Tests\TestCasePlaySongSelect.cs" />
|
||||
<Compile Include="Tests\TestCaseTwoLayerButton.cs" />
|
||||
@ -207,6 +208,7 @@
|
||||
<Compile Include="Tests\TestCaseBeatmapOptionsOverlay.cs" />
|
||||
<Compile Include="Tests\TestCaseLeaderboard.cs" />
|
||||
<Compile Include="Beatmaps\TestWorkingBeatmap.cs" />
|
||||
<Compile Include="Tests\TestCaseBeatmapDetailArea.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup />
|
||||
|
@ -10,6 +10,8 @@ using osu.Game.Modes.Mods;
|
||||
using osu.Game.Modes.UI;
|
||||
using osu.Game.Screens.Play;
|
||||
using System.Collections.Generic;
|
||||
using osu.Game.Modes.Catch.Scoring;
|
||||
using osu.Game.Modes.Scoring;
|
||||
|
||||
namespace osu.Game.Modes.Catch
|
||||
{
|
||||
|
@ -5,7 +5,10 @@ using osu.Game.Modes.Judgements;
|
||||
|
||||
namespace osu.Game.Modes.Catch.Judgements
|
||||
{
|
||||
public class CatchJudgementInfo : JudgementInfo
|
||||
public class CatchJudgement : Judgement
|
||||
{
|
||||
public override string ResultString => string.Empty;
|
||||
|
||||
public override string MaxResultString => string.Empty;
|
||||
}
|
||||
}
|
@ -3,22 +3,23 @@
|
||||
|
||||
using osu.Game.Modes.Catch.Judgements;
|
||||
using osu.Game.Modes.Catch.Objects;
|
||||
using osu.Game.Modes.Scoring;
|
||||
using osu.Game.Modes.UI;
|
||||
|
||||
namespace osu.Game.Modes.Catch
|
||||
namespace osu.Game.Modes.Catch.Scoring
|
||||
{
|
||||
internal class CatchScoreProcessor : ScoreProcessor<CatchBaseHit, CatchJudgementInfo>
|
||||
internal class CatchScoreProcessor : ScoreProcessor<CatchBaseHit, CatchJudgement>
|
||||
{
|
||||
public CatchScoreProcessor()
|
||||
{
|
||||
}
|
||||
|
||||
public CatchScoreProcessor(HitRenderer<CatchBaseHit, CatchJudgementInfo> hitRenderer)
|
||||
public CatchScoreProcessor(HitRenderer<CatchBaseHit, CatchJudgement> hitRenderer)
|
||||
: base(hitRenderer)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void UpdateCalculations(CatchJudgementInfo newJudgement)
|
||||
protected override void OnNewJugement(CatchJudgement judgement)
|
||||
{
|
||||
}
|
||||
}
|
@ -5,12 +5,14 @@ using osu.Game.Beatmaps;
|
||||
using osu.Game.Modes.Catch.Beatmaps;
|
||||
using osu.Game.Modes.Catch.Judgements;
|
||||
using osu.Game.Modes.Catch.Objects;
|
||||
using osu.Game.Modes.Catch.Scoring;
|
||||
using osu.Game.Modes.Objects.Drawables;
|
||||
using osu.Game.Modes.Scoring;
|
||||
using osu.Game.Modes.UI;
|
||||
|
||||
namespace osu.Game.Modes.Catch.UI
|
||||
{
|
||||
public class CatchHitRenderer : HitRenderer<CatchBaseHit, CatchJudgementInfo>
|
||||
public class CatchHitRenderer : HitRenderer<CatchBaseHit, CatchJudgement>
|
||||
{
|
||||
public CatchHitRenderer(WorkingBeatmap beatmap)
|
||||
: base(beatmap)
|
||||
@ -23,8 +25,8 @@ namespace osu.Game.Modes.Catch.UI
|
||||
|
||||
protected override IBeatmapProcessor<CatchBaseHit> CreateBeatmapProcessor() => new CatchBeatmapProcessor();
|
||||
|
||||
protected override Playfield<CatchBaseHit, CatchJudgementInfo> CreatePlayfield() => new CatchPlayfield();
|
||||
protected override Playfield<CatchBaseHit, CatchJudgement> CreatePlayfield() => new CatchPlayfield();
|
||||
|
||||
protected override DrawableHitObject<CatchBaseHit, CatchJudgementInfo> GetVisualRepresentation(CatchBaseHit h) => null;
|
||||
protected override DrawableHitObject<CatchBaseHit, CatchJudgement> GetVisualRepresentation(CatchBaseHit h) => null;
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ using osu.Game.Modes.Catch.Judgements;
|
||||
|
||||
namespace osu.Game.Modes.Catch.UI
|
||||
{
|
||||
public class CatchPlayfield : Playfield<CatchBaseHit, CatchJudgementInfo>
|
||||
public class CatchPlayfield : Playfield<CatchBaseHit, CatchJudgement>
|
||||
{
|
||||
public CatchPlayfield()
|
||||
{
|
||||
|
@ -50,8 +50,8 @@
|
||||
<Compile Include="Beatmaps\CatchBeatmapConverter.cs" />
|
||||
<Compile Include="Beatmaps\CatchBeatmapProcessor.cs" />
|
||||
<Compile Include="CatchDifficultyCalculator.cs" />
|
||||
<Compile Include="CatchScoreProcessor.cs" />
|
||||
<Compile Include="Judgements\CatchJudgementInfo.cs" />
|
||||
<Compile Include="Scoring\CatchScoreProcessor.cs" />
|
||||
<Compile Include="Judgements\CatchJudgement.cs" />
|
||||
<Compile Include="Objects\CatchBaseHit.cs" />
|
||||
<Compile Include="Objects\Drawable\DrawableFruit.cs" />
|
||||
<Compile Include="Objects\Droplet.cs" />
|
||||
|
@ -5,7 +5,10 @@ using osu.Game.Modes.Judgements;
|
||||
|
||||
namespace osu.Game.Modes.Mania.Judgements
|
||||
{
|
||||
public class ManiaJudgementInfo : JudgementInfo
|
||||
public class ManiaJudgement : Judgement
|
||||
{
|
||||
public override string ResultString => string.Empty;
|
||||
|
||||
public override string MaxResultString => string.Empty;
|
||||
}
|
||||
}
|
@ -9,6 +9,8 @@ using osu.Game.Modes.Mods;
|
||||
using osu.Game.Modes.UI;
|
||||
using osu.Game.Screens.Play;
|
||||
using System.Collections.Generic;
|
||||
using osu.Game.Modes.Mania.Scoring;
|
||||
using osu.Game.Modes.Scoring;
|
||||
|
||||
namespace osu.Game.Modes.Mania
|
||||
{
|
||||
|
@ -3,22 +3,23 @@
|
||||
|
||||
using osu.Game.Modes.Mania.Judgements;
|
||||
using osu.Game.Modes.Mania.Objects;
|
||||
using osu.Game.Modes.Scoring;
|
||||
using osu.Game.Modes.UI;
|
||||
|
||||
namespace osu.Game.Modes.Mania
|
||||
namespace osu.Game.Modes.Mania.Scoring
|
||||
{
|
||||
internal class ManiaScoreProcessor : ScoreProcessor<ManiaBaseHit, ManiaJudgementInfo>
|
||||
internal class ManiaScoreProcessor : ScoreProcessor<ManiaBaseHit, ManiaJudgement>
|
||||
{
|
||||
public ManiaScoreProcessor()
|
||||
{
|
||||
}
|
||||
|
||||
public ManiaScoreProcessor(HitRenderer<ManiaBaseHit, ManiaJudgementInfo> hitRenderer)
|
||||
public ManiaScoreProcessor(HitRenderer<ManiaBaseHit, ManiaJudgement> hitRenderer)
|
||||
: base(hitRenderer)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void UpdateCalculations(ManiaJudgementInfo newJudgement)
|
||||
protected override void OnNewJugement(ManiaJudgement judgement)
|
||||
{
|
||||
}
|
||||
}
|
@ -5,12 +5,14 @@ using osu.Game.Beatmaps;
|
||||
using osu.Game.Modes.Mania.Beatmaps;
|
||||
using osu.Game.Modes.Mania.Judgements;
|
||||
using osu.Game.Modes.Mania.Objects;
|
||||
using osu.Game.Modes.Mania.Scoring;
|
||||
using osu.Game.Modes.Objects.Drawables;
|
||||
using osu.Game.Modes.Scoring;
|
||||
using osu.Game.Modes.UI;
|
||||
|
||||
namespace osu.Game.Modes.Mania.UI
|
||||
{
|
||||
public class ManiaHitRenderer : HitRenderer<ManiaBaseHit, ManiaJudgementInfo>
|
||||
public class ManiaHitRenderer : HitRenderer<ManiaBaseHit, ManiaJudgement>
|
||||
{
|
||||
private readonly int columns;
|
||||
|
||||
@ -26,8 +28,8 @@ namespace osu.Game.Modes.Mania.UI
|
||||
|
||||
protected override IBeatmapProcessor<ManiaBaseHit> CreateBeatmapProcessor() => new ManiaBeatmapProcessor();
|
||||
|
||||
protected override Playfield<ManiaBaseHit, ManiaJudgementInfo> CreatePlayfield() => new ManiaPlayfield(columns);
|
||||
protected override Playfield<ManiaBaseHit, ManiaJudgement> CreatePlayfield() => new ManiaPlayfield(columns);
|
||||
|
||||
protected override DrawableHitObject<ManiaBaseHit, ManiaJudgementInfo> GetVisualRepresentation(ManiaBaseHit h) => null;
|
||||
protected override DrawableHitObject<ManiaBaseHit, ManiaJudgement> GetVisualRepresentation(ManiaBaseHit h) => null;
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ using osu.Game.Modes.Mania.Judgements;
|
||||
|
||||
namespace osu.Game.Modes.Mania.UI
|
||||
{
|
||||
public class ManiaPlayfield : Playfield<ManiaBaseHit, ManiaJudgementInfo>
|
||||
public class ManiaPlayfield : Playfield<ManiaBaseHit, ManiaJudgement>
|
||||
{
|
||||
public ManiaPlayfield(int columns)
|
||||
{
|
||||
|
@ -49,9 +49,9 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="Beatmaps\ManiaBeatmapConverter.cs" />
|
||||
<Compile Include="Beatmaps\ManiaBeatmapProcessor.cs" />
|
||||
<Compile Include="Judgements\ManiaJudgementInfo.cs" />
|
||||
<Compile Include="Judgements\ManiaJudgement.cs" />
|
||||
<Compile Include="ManiaDifficultyCalculator.cs" />
|
||||
<Compile Include="ManiaScoreProcessor.cs" />
|
||||
<Compile Include="Scoring\ManiaScoreProcessor.cs" />
|
||||
<Compile Include="Objects\Drawable\DrawableNote.cs" />
|
||||
<Compile Include="Objects\HoldNote.cs" />
|
||||
<Compile Include="Objects\ManiaBaseHit.cs" />
|
||||
|
@ -44,11 +44,8 @@ namespace osu.Game.Modes.Osu.Beatmaps
|
||||
{
|
||||
StartTime = original.StartTime,
|
||||
Sample = original.Sample,
|
||||
|
||||
CurveObject = curveData,
|
||||
|
||||
Position = positionData?.Position ?? Vector2.Zero,
|
||||
|
||||
NewCombo = comboData?.NewCombo ?? false
|
||||
};
|
||||
}
|
||||
@ -60,7 +57,6 @@ namespace osu.Game.Modes.Osu.Beatmaps
|
||||
StartTime = original.StartTime,
|
||||
Sample = original.Sample,
|
||||
Position = new Vector2(512, 384) / 2,
|
||||
|
||||
EndTime = endTimeData.EndTime
|
||||
};
|
||||
}
|
||||
@ -69,9 +65,7 @@ namespace osu.Game.Modes.Osu.Beatmaps
|
||||
{
|
||||
StartTime = original.StartTime,
|
||||
Sample = original.Sample,
|
||||
|
||||
Position = positionData?.Position ?? Vector2.Zero,
|
||||
|
||||
NewCombo = comboData?.NewCombo ?? false
|
||||
};
|
||||
}
|
||||
|
@ -4,10 +4,11 @@
|
||||
using OpenTK;
|
||||
using osu.Game.Modes.Judgements;
|
||||
using osu.Game.Modes.Osu.Objects.Drawables;
|
||||
using osu.Framework.Extensions;
|
||||
|
||||
namespace osu.Game.Modes.Osu.Judgements
|
||||
{
|
||||
public class OsuJudgementInfo : JudgementInfo
|
||||
public class OsuJudgement : Judgement
|
||||
{
|
||||
/// <summary>
|
||||
/// The positional hit offset.
|
||||
@ -24,6 +25,10 @@ namespace osu.Game.Modes.Osu.Judgements
|
||||
/// </summary>
|
||||
public OsuScoreResult MaxScore = OsuScoreResult.Hit300;
|
||||
|
||||
public override string ResultString => Score.GetDescription();
|
||||
|
||||
public override string MaxResultString => MaxScore.GetDescription();
|
||||
|
||||
public int ScoreValue => scoreToInt(Score);
|
||||
|
||||
public int MaxScoreValue => scoreToInt(MaxScore);
|
@ -7,6 +7,7 @@ using osu.Game.Modes.Mods;
|
||||
using osu.Game.Modes.Osu.Objects;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using osu.Game.Modes.Scoring;
|
||||
|
||||
namespace osu.Game.Modes.Osu.Mods
|
||||
{
|
||||
|
@ -13,8 +13,6 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
{
|
||||
public class DrawableHitCircle : DrawableOsuHitObject, IDrawableHitObjectWithProxiedApproach
|
||||
{
|
||||
private readonly OsuHitObject osuObject;
|
||||
|
||||
public ApproachCircle ApproachCircle;
|
||||
private readonly CirclePiece circle;
|
||||
private readonly RingPiece ring;
|
||||
@ -27,20 +25,18 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
{
|
||||
Origin = Anchor.Centre;
|
||||
|
||||
osuObject = h;
|
||||
|
||||
Position = osuObject.StackedPosition;
|
||||
Scale = new Vector2(osuObject.Scale);
|
||||
Position = HitObject.StackedPosition;
|
||||
Scale = new Vector2(HitObject.Scale);
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
glow = new GlowPiece
|
||||
{
|
||||
Colour = osuObject.ComboColour
|
||||
Colour = AccentColour
|
||||
},
|
||||
circle = new CirclePiece
|
||||
{
|
||||
Colour = osuObject.ComboColour,
|
||||
Colour = AccentColour,
|
||||
Hit = () =>
|
||||
{
|
||||
if (Judgement.Result.HasValue) return false;
|
||||
@ -58,11 +54,11 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
flash = new FlashPiece(),
|
||||
explode = new ExplodePiece
|
||||
{
|
||||
Colour = osuObject.ComboColour,
|
||||
Colour = AccentColour,
|
||||
},
|
||||
ApproachCircle = new ApproachCircle
|
||||
{
|
||||
Colour = osuObject.ComboColour,
|
||||
Colour = AccentColour,
|
||||
}
|
||||
};
|
||||
|
||||
@ -115,8 +111,8 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
|
||||
ApproachCircle.FadeOut();
|
||||
|
||||
double endTime = (osuObject as IHasEndTime)?.EndTime ?? osuObject.StartTime;
|
||||
double duration = endTime - osuObject.StartTime;
|
||||
double endTime = (HitObject as IHasEndTime)?.EndTime ?? HitObject.StartTime;
|
||||
double duration = endTime - HitObject.StartTime;
|
||||
|
||||
glow.Delay(duration);
|
||||
glow.FadeOut(400);
|
||||
|
@ -7,18 +7,19 @@ using osu.Game.Modes.Osu.Judgements;
|
||||
|
||||
namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
{
|
||||
public class DrawableOsuHitObject : DrawableHitObject<OsuHitObject, OsuJudgementInfo>
|
||||
public class DrawableOsuHitObject : DrawableHitObject<OsuHitObject, OsuJudgement>
|
||||
{
|
||||
public const float TIME_PREEMPT = 600;
|
||||
public const float TIME_FADEIN = 400;
|
||||
public const float TIME_FADEOUT = 500;
|
||||
|
||||
public DrawableOsuHitObject(OsuHitObject hitObject)
|
||||
protected DrawableOsuHitObject(OsuHitObject hitObject)
|
||||
: base(hitObject)
|
||||
{
|
||||
AccentColour = HitObject.ComboColour;
|
||||
}
|
||||
|
||||
protected override OsuJudgementInfo CreateJudgementInfo() => new OsuJudgementInfo { MaxScore = OsuScoreResult.Hit300 };
|
||||
protected override OsuJudgement CreateJudgement() => new OsuJudgement { MaxScore = OsuScoreResult.Hit300 };
|
||||
|
||||
protected override void UpdateState(ArmedState state)
|
||||
{
|
||||
|
26
osu.Game.Modes.Osu/Objects/Drawables/DrawableOsuJudgement.cs
Normal file
26
osu.Game.Modes.Osu/Objects/Drawables/DrawableOsuJudgement.cs
Normal file
@ -0,0 +1,26 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Graphics.Transforms;
|
||||
using osu.Game.Modes.Objects.Drawables;
|
||||
using osu.Game.Modes.Osu.Judgements;
|
||||
using OpenTK;
|
||||
using osu.Game.Modes.Judgements;
|
||||
|
||||
namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
{
|
||||
public class DrawableOsuJudgement : DrawableJudgement<OsuJudgement>
|
||||
{
|
||||
public DrawableOsuJudgement(OsuJudgement judgement) : base(judgement)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
if (Judgement.Result != HitResult.Miss)
|
||||
JudgementText.TransformSpacingTo(new Vector2(14, 0), 1800, EasingTypes.OutQuint);
|
||||
|
||||
base.LoadComplete();
|
||||
}
|
||||
}
|
||||
}
|
@ -39,6 +39,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
{
|
||||
body = new SliderBody(s)
|
||||
{
|
||||
AccentColour = AccentColour,
|
||||
Position = s.StackedPosition,
|
||||
PathWidth = s.Scale * 64,
|
||||
},
|
||||
@ -56,6 +57,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
ball = new SliderBall(s)
|
||||
{
|
||||
Scale = new Vector2(s.Scale),
|
||||
AccentColour = AccentColour
|
||||
},
|
||||
initialCircle = new DrawableHitCircle(new HitCircle
|
||||
{
|
||||
|
@ -27,7 +27,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
|
||||
public override bool RemoveWhenNotAlive => false;
|
||||
|
||||
protected override OsuJudgementInfo CreateJudgementInfo() => new OsuJudgementInfo { MaxScore = OsuScoreResult.SliderTick };
|
||||
protected override OsuJudgement CreateJudgement() => new OsuJudgement { MaxScore = OsuScoreResult.SliderTick };
|
||||
|
||||
public DrawableSliderTick(SliderTick sliderTick) : base(sliderTick)
|
||||
{
|
||||
@ -48,7 +48,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = sliderTick.ComboColour,
|
||||
Colour = AccentColour,
|
||||
Alpha = 0.3f,
|
||||
}
|
||||
};
|
||||
|
@ -48,7 +48,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
Alpha = 0,
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
DiscColour = s.ComboColour
|
||||
DiscColour = AccentColour
|
||||
},
|
||||
circleContainer = new Container
|
||||
{
|
||||
|
@ -1,86 +0,0 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Transforms;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Modes.Objects.Drawables;
|
||||
using osu.Game.Modes.Osu.Judgements;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
{
|
||||
public class HitExplosion : FillFlowContainer
|
||||
{
|
||||
private readonly OsuJudgementInfo judgement;
|
||||
private readonly SpriteText line1;
|
||||
private readonly SpriteText line2;
|
||||
|
||||
public HitExplosion(OsuJudgementInfo judgement, OsuHitObject h = null)
|
||||
{
|
||||
this.judgement = judgement;
|
||||
AutoSizeAxes = Axes.Both;
|
||||
Origin = Anchor.Centre;
|
||||
|
||||
Direction = FillDirection.Vertical;
|
||||
Spacing = new Vector2(0, 2);
|
||||
Position = (h?.StackedEndPosition ?? Vector2.Zero) + judgement.PositionOffset;
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
line1 = new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Text = judgement.Score.GetDescription(),
|
||||
Font = @"Venera",
|
||||
TextSize = 16,
|
||||
},
|
||||
line2 = new OsuSpriteText
|
||||
{
|
||||
Text = judgement.Combo.GetDescription(),
|
||||
Font = @"Venera",
|
||||
TextSize = 11,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
if (judgement.Result == HitResult.Miss)
|
||||
{
|
||||
FadeInFromZero(60);
|
||||
|
||||
ScaleTo(1.6f);
|
||||
ScaleTo(1, 100, EasingTypes.In);
|
||||
|
||||
MoveToOffset(new Vector2(0, 100), 800, EasingTypes.InQuint);
|
||||
RotateTo(40, 800, EasingTypes.InQuint);
|
||||
|
||||
Delay(600);
|
||||
FadeOut(200);
|
||||
}
|
||||
else
|
||||
{
|
||||
line1.TransformSpacingTo(new Vector2(14, 0), 1800, EasingTypes.OutQuint);
|
||||
line2.TransformSpacingTo(new Vector2(14, 0), 1800, EasingTypes.OutQuint);
|
||||
FadeOut(500);
|
||||
}
|
||||
|
||||
switch (judgement.Result)
|
||||
{
|
||||
case HitResult.Miss:
|
||||
Colour = Color4.Red;
|
||||
break;
|
||||
}
|
||||
|
||||
Expire();
|
||||
}
|
||||
}
|
||||
}
|
@ -12,10 +12,26 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
||||
{
|
||||
public class SliderBall : CircularContainer, ISliderProgress
|
||||
{
|
||||
private const float width = 128;
|
||||
|
||||
private Color4 accentColour = Color4.Black;
|
||||
/// <summary>
|
||||
/// The colour that is used for the slider ball.
|
||||
/// </summary>
|
||||
public Color4 AccentColour
|
||||
{
|
||||
get { return accentColour; }
|
||||
set
|
||||
{
|
||||
accentColour = value;
|
||||
if (ball != null)
|
||||
ball.Colour = value;
|
||||
}
|
||||
}
|
||||
|
||||
private readonly Slider slider;
|
||||
private readonly Box follow;
|
||||
|
||||
private const float width = 128;
|
||||
private readonly Box ball;
|
||||
|
||||
public SliderBall(Slider slider)
|
||||
{
|
||||
@ -49,9 +65,9 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
||||
Alpha = 1,
|
||||
Children = new[]
|
||||
{
|
||||
new Box
|
||||
ball = new Box
|
||||
{
|
||||
Colour = slider.ComboColour,
|
||||
Colour = AccentColour,
|
||||
Alpha = 0.4f,
|
||||
Width = width,
|
||||
Height = width,
|
||||
|
@ -13,6 +13,7 @@ using osu.Framework.Graphics.Textures;
|
||||
using osu.Game.Configuration;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics.ES30;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
||||
{
|
||||
@ -24,15 +25,32 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
||||
public float PathWidth
|
||||
{
|
||||
get { return path.PathWidth; }
|
||||
set
|
||||
{
|
||||
path.PathWidth = value;
|
||||
}
|
||||
set { path.PathWidth = value; }
|
||||
}
|
||||
|
||||
public double? SnakedStart { get; private set; }
|
||||
public double? SnakedEnd { get; private set; }
|
||||
|
||||
private Color4 accentColour;
|
||||
/// <summary>
|
||||
/// Used to colour the path.
|
||||
/// </summary>
|
||||
public Color4 AccentColour
|
||||
{
|
||||
get { return accentColour; }
|
||||
set
|
||||
{
|
||||
if (accentColour == value)
|
||||
return;
|
||||
accentColour = value;
|
||||
|
||||
if (LoadState == LoadState.Loaded)
|
||||
Schedule(reloadTexture);
|
||||
}
|
||||
}
|
||||
|
||||
private int textureWidth => (int)PathWidth * 2;
|
||||
|
||||
private readonly Slider slider;
|
||||
public SliderBody(Slider s)
|
||||
{
|
||||
@ -82,7 +100,12 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
||||
snakingIn = config.GetBindable<bool>(OsuConfig.SnakingInSliders);
|
||||
snakingOut = config.GetBindable<bool>(OsuConfig.SnakingOutSliders);
|
||||
|
||||
int textureWidth = (int)PathWidth * 2;
|
||||
reloadTexture();
|
||||
}
|
||||
|
||||
private void reloadTexture()
|
||||
{
|
||||
var texture = new Texture(textureWidth, 1);
|
||||
|
||||
//initialise background
|
||||
var upload = new TextureUpload(textureWidth * 4);
|
||||
@ -110,14 +133,13 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
||||
{
|
||||
progress -= border_portion;
|
||||
|
||||
bytes[i * 4] = (byte)(slider.ComboColour.R * 255);
|
||||
bytes[i * 4 + 1] = (byte)(slider.ComboColour.G * 255);
|
||||
bytes[i * 4 + 2] = (byte)(slider.ComboColour.B * 255);
|
||||
bytes[i * 4 + 3] = (byte)((opacity_at_edge - (opacity_at_edge - opacity_at_centre) * progress / gradient_portion) * (slider.ComboColour.A * 255));
|
||||
bytes[i * 4] = (byte)(AccentColour.R * 255);
|
||||
bytes[i * 4 + 1] = (byte)(AccentColour.G * 255);
|
||||
bytes[i * 4 + 2] = (byte)(AccentColour.B * 255);
|
||||
bytes[i * 4 + 3] = (byte)((opacity_at_edge - (opacity_at_edge - opacity_at_centre) * progress / gradient_portion) * (AccentColour.A * 255));
|
||||
}
|
||||
}
|
||||
|
||||
var texture = new Texture(textureWidth, 1);
|
||||
texture.SetData(upload);
|
||||
path.Texture = texture;
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ namespace osu.Game.Modes.Osu.Objects
|
||||
|
||||
public float Scale { get; set; } = 1;
|
||||
|
||||
public Color4 ComboColour { get; set; }
|
||||
public Color4 ComboColour { get; set; } = Color4.Gray;
|
||||
public virtual bool NewCombo { get; set; }
|
||||
public int ComboIndex { get; set; }
|
||||
|
||||
|
@ -12,6 +12,8 @@ using osu.Game.Modes.UI;
|
||||
using osu.Game.Screens.Play;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Game.Modes.Osu.Scoring;
|
||||
using osu.Game.Modes.Scoring;
|
||||
|
||||
namespace osu.Game.Modes.Osu
|
||||
{
|
||||
|
@ -1,7 +1,9 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
namespace osu.Game.Modes.Osu
|
||||
using osu.Game.Modes.Scoring;
|
||||
|
||||
namespace osu.Game.Modes.Osu.Scoring
|
||||
{
|
||||
internal class OsuScore : Score
|
||||
{
|
@ -4,17 +4,18 @@
|
||||
using osu.Game.Modes.Objects.Drawables;
|
||||
using osu.Game.Modes.Osu.Judgements;
|
||||
using osu.Game.Modes.Osu.Objects;
|
||||
using osu.Game.Modes.Scoring;
|
||||
using osu.Game.Modes.UI;
|
||||
|
||||
namespace osu.Game.Modes.Osu
|
||||
namespace osu.Game.Modes.Osu.Scoring
|
||||
{
|
||||
internal class OsuScoreProcessor : ScoreProcessor<OsuHitObject, OsuJudgementInfo>
|
||||
internal class OsuScoreProcessor : ScoreProcessor<OsuHitObject, OsuJudgement>
|
||||
{
|
||||
public OsuScoreProcessor()
|
||||
{
|
||||
}
|
||||
|
||||
public OsuScoreProcessor(HitRenderer<OsuHitObject, OsuJudgementInfo> hitRenderer)
|
||||
public OsuScoreProcessor(HitRenderer<OsuHitObject, OsuJudgement> hitRenderer)
|
||||
: base(hitRenderer)
|
||||
{
|
||||
}
|
||||
@ -27,7 +28,7 @@ namespace osu.Game.Modes.Osu
|
||||
Accuracy.Value = 1;
|
||||
}
|
||||
|
||||
protected override void UpdateCalculations(OsuJudgementInfo judgement)
|
||||
protected override void OnNewJugement(OsuJudgement judgement)
|
||||
{
|
||||
if (judgement != null)
|
||||
{
|
||||
@ -47,9 +48,8 @@ namespace osu.Game.Modes.Osu
|
||||
int score = 0;
|
||||
int maxScore = 0;
|
||||
|
||||
foreach (var judgementInfo in Judgements)
|
||||
foreach (var j in Judgements)
|
||||
{
|
||||
var j = judgementInfo;
|
||||
score += j.ScoreValue;
|
||||
maxScore += j.MaxScoreValue;
|
||||
}
|
@ -7,12 +7,14 @@ using osu.Game.Modes.Osu.Beatmaps;
|
||||
using osu.Game.Modes.Osu.Judgements;
|
||||
using osu.Game.Modes.Osu.Objects;
|
||||
using osu.Game.Modes.Osu.Objects.Drawables;
|
||||
using osu.Game.Modes.Osu.Scoring;
|
||||
using osu.Game.Modes.Scoring;
|
||||
using osu.Game.Modes.UI;
|
||||
using osu.Game.Screens.Play;
|
||||
|
||||
namespace osu.Game.Modes.Osu.UI
|
||||
{
|
||||
public class OsuHitRenderer : HitRenderer<OsuHitObject, OsuJudgementInfo>
|
||||
public class OsuHitRenderer : HitRenderer<OsuHitObject, OsuJudgement>
|
||||
{
|
||||
public OsuHitRenderer(WorkingBeatmap beatmap)
|
||||
: base(beatmap)
|
||||
@ -25,11 +27,11 @@ namespace osu.Game.Modes.Osu.UI
|
||||
|
||||
protected override IBeatmapProcessor<OsuHitObject> CreateBeatmapProcessor() => new OsuBeatmapProcessor();
|
||||
|
||||
protected override Playfield<OsuHitObject, OsuJudgementInfo> CreatePlayfield() => new OsuPlayfield();
|
||||
protected override Playfield<OsuHitObject, OsuJudgement> CreatePlayfield() => new OsuPlayfield();
|
||||
|
||||
protected override KeyConversionInputManager CreateKeyConversionInputManager() => new OsuKeyConversionInputManager();
|
||||
|
||||
protected override DrawableHitObject<OsuHitObject, OsuJudgementInfo> GetVisualRepresentation(OsuHitObject h)
|
||||
protected override DrawableHitObject<OsuHitObject, OsuJudgement> GetVisualRepresentation(OsuHitObject h)
|
||||
{
|
||||
var circle = h as HitCircle;
|
||||
if (circle != null)
|
||||
|
@ -15,7 +15,7 @@ using osu.Game.Modes.Osu.Judgements;
|
||||
|
||||
namespace osu.Game.Modes.Osu.UI
|
||||
{
|
||||
public class OsuPlayfield : Playfield<OsuHitObject, OsuJudgementInfo>
|
||||
public class OsuPlayfield : Playfield<OsuHitObject, OsuJudgement>
|
||||
{
|
||||
private readonly Container approachCircles;
|
||||
private readonly Container judgementLayer;
|
||||
@ -65,7 +65,7 @@ namespace osu.Game.Modes.Osu.UI
|
||||
AddInternal(new GameplayCursor());
|
||||
}
|
||||
|
||||
public override void Add(DrawableHitObject<OsuHitObject, OsuJudgementInfo> h)
|
||||
public override void Add(DrawableHitObject<OsuHitObject, OsuJudgement> h)
|
||||
{
|
||||
h.Depth = (float)h.HitObject.StartTime;
|
||||
|
||||
@ -83,9 +83,13 @@ namespace osu.Game.Modes.Osu.UI
|
||||
.OrderBy(h => h.StartTime);
|
||||
}
|
||||
|
||||
public override void OnJudgement(DrawableHitObject<OsuHitObject, OsuJudgementInfo> judgedObject)
|
||||
public override void OnJudgement(DrawableHitObject<OsuHitObject, OsuJudgement> judgedObject)
|
||||
{
|
||||
HitExplosion explosion = new HitExplosion(judgedObject.Judgement, judgedObject.HitObject);
|
||||
DrawableOsuJudgement explosion = new DrawableOsuJudgement(judgedObject.Judgement)
|
||||
{
|
||||
Origin = Anchor.Centre,
|
||||
Position = judgedObject.HitObject.StackedEndPosition + judgedObject.Judgement.PositionOffset
|
||||
};
|
||||
|
||||
judgementLayer.Add(explosion);
|
||||
}
|
||||
|
@ -48,7 +48,7 @@
|
||||
<Compile Include="Objects\Drawables\DrawableOsuHitObject.cs" />
|
||||
<Compile Include="Objects\Drawables\Connections\ConnectionRenderer.cs" />
|
||||
<Compile Include="Objects\Drawables\Connections\FollowPointRenderer.cs" />
|
||||
<Compile Include="Judgements\OsuJudgementInfo.cs" />
|
||||
<Compile Include="Judgements\OsuJudgement.cs" />
|
||||
<Compile Include="Objects\Drawables\Pieces\ApproachCircle.cs" />
|
||||
<Compile Include="Objects\Drawables\Pieces\SpinnerBackground.cs" />
|
||||
<Compile Include="Objects\Drawables\Pieces\CirclePiece.cs" />
|
||||
@ -58,7 +58,7 @@
|
||||
<Compile Include="Objects\Drawables\Pieces\ExplodePiece.cs" />
|
||||
<Compile Include="Objects\Drawables\Pieces\FlashPiece.cs" />
|
||||
<Compile Include="Objects\Drawables\Pieces\GlowPiece.cs" />
|
||||
<Compile Include="Objects\Drawables\HitExplosion.cs" />
|
||||
<Compile Include="Objects\Drawables\DrawableOsuJudgement.cs" />
|
||||
<Compile Include="Objects\Drawables\Pieces\NumberPiece.cs" />
|
||||
<Compile Include="Objects\Drawables\DrawableSliderTick.cs" />
|
||||
<Compile Include="Objects\Drawables\Pieces\RingPiece.cs" />
|
||||
@ -72,8 +72,8 @@
|
||||
<Compile Include="OsuAutoReplay.cs" />
|
||||
<Compile Include="OsuDifficultyCalculator.cs" />
|
||||
<Compile Include="OsuKeyConversionInputManager.cs" />
|
||||
<Compile Include="OsuScore.cs" />
|
||||
<Compile Include="OsuScoreProcessor.cs" />
|
||||
<Compile Include="Scoring\OsuScore.cs" />
|
||||
<Compile Include="Scoring\OsuScoreProcessor.cs" />
|
||||
<Compile Include="UI\OsuHitRenderer.cs" />
|
||||
<Compile Include="UI\OsuPlayfield.cs" />
|
||||
<Compile Include="OsuRuleset.cs" />
|
||||
|
@ -2,18 +2,80 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Beatmaps.Legacy;
|
||||
using osu.Game.Beatmaps.Samples;
|
||||
using osu.Game.Modes.Objects;
|
||||
using osu.Game.Modes.Objects.Types;
|
||||
using osu.Game.Modes.Taiko.Objects;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace osu.Game.Modes.Taiko.Beatmaps
|
||||
{
|
||||
internal class TaikoBeatmapConverter : IBeatmapConverter<TaikoHitObject>
|
||||
{
|
||||
private const float legacy_velocity_scale = 1.4f;
|
||||
private const float bash_convert_factor = 1.65f;
|
||||
|
||||
public Beatmap<TaikoHitObject> Convert(Beatmap original)
|
||||
{
|
||||
if (original is LegacyBeatmap)
|
||||
original.TimingInfo.ControlPoints.ForEach(c => c.VelocityAdjustment /= legacy_velocity_scale);
|
||||
|
||||
return new Beatmap<TaikoHitObject>(original)
|
||||
{
|
||||
HitObjects = new List<TaikoHitObject>() // Todo: Implement
|
||||
HitObjects = convertHitObjects(original.HitObjects)
|
||||
};
|
||||
}
|
||||
|
||||
private List<TaikoHitObject> convertHitObjects(List<HitObject> hitObjects)
|
||||
{
|
||||
return hitObjects.Select(convertHitObject).ToList();
|
||||
}
|
||||
|
||||
private TaikoHitObject convertHitObject(HitObject original)
|
||||
{
|
||||
// Check if this HitObject is already a TaikoHitObject, and return it if so
|
||||
TaikoHitObject originalTaiko = original as TaikoHitObject;
|
||||
if (originalTaiko != null)
|
||||
return originalTaiko;
|
||||
|
||||
IHasDistance distanceData = original as IHasDistance;
|
||||
IHasRepeats repeatsData = original as IHasRepeats;
|
||||
IHasEndTime endTimeData = original as IHasEndTime;
|
||||
|
||||
bool accented = ((original.Sample?.Type ?? SampleType.None) & SampleType.Finish) > 0;
|
||||
|
||||
if (distanceData != null)
|
||||
{
|
||||
return new DrumRoll
|
||||
{
|
||||
StartTime = original.StartTime,
|
||||
Sample = original.Sample,
|
||||
Accented = accented,
|
||||
|
||||
Distance = distanceData.Distance * (repeatsData?.RepeatCount ?? 1)
|
||||
};
|
||||
}
|
||||
|
||||
if (endTimeData != null)
|
||||
{
|
||||
// We compute the end time manually to add in the Bash convert factor
|
||||
return new Bash
|
||||
{
|
||||
StartTime = original.StartTime,
|
||||
Sample = original.Sample,
|
||||
Accented = accented,
|
||||
|
||||
EndTime = original.StartTime + endTimeData.Duration * bash_convert_factor
|
||||
};
|
||||
}
|
||||
|
||||
return new Hit
|
||||
{
|
||||
StartTime = original.StartTime,
|
||||
Sample = original.Sample,
|
||||
Accented = accented
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,34 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
namespace osu.Game.Modes.Taiko.Judgements
|
||||
{
|
||||
public class TaikoDrumRollTickJudgement : TaikoJudgement
|
||||
{
|
||||
/// <summary>
|
||||
/// Drum roll ticks don't display judgement text.
|
||||
/// </summary>
|
||||
public override string ResultString => string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Drum roll ticks don't display judgement text.
|
||||
/// </summary>
|
||||
public override string MaxResultString => string.Empty;
|
||||
|
||||
protected override int NumericResultForScore(TaikoHitResult result)
|
||||
{
|
||||
switch (result)
|
||||
{
|
||||
default:
|
||||
return 0;
|
||||
case TaikoHitResult.Great:
|
||||
return 200;
|
||||
}
|
||||
}
|
||||
|
||||
protected override int NumericResultForAccuracy(TaikoHitResult result)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,11 +1,15 @@
|
||||
// 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.ComponentModel;
|
||||
|
||||
namespace osu.Game.Modes.Taiko.Judgements
|
||||
{
|
||||
public enum TaikoHitResult
|
||||
{
|
||||
[Description("GOOD")]
|
||||
Good,
|
||||
[Description("GREAT")]
|
||||
Great
|
||||
}
|
||||
}
|
||||
|
@ -2,40 +2,45 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Game.Modes.Judgements;
|
||||
using osu.Framework.Extensions;
|
||||
|
||||
namespace osu.Game.Modes.Taiko.Judgements
|
||||
{
|
||||
public class TaikoJudgementInfo : JudgementInfo
|
||||
public class TaikoJudgement : Judgement
|
||||
{
|
||||
/// <summary>
|
||||
/// The maximum score value.
|
||||
/// The maximum result.
|
||||
/// </summary>
|
||||
public const TaikoHitResult MAX_HIT_RESULT = TaikoHitResult.Great;
|
||||
|
||||
/// <summary>
|
||||
/// The score value.
|
||||
/// The result.
|
||||
/// </summary>
|
||||
public TaikoHitResult TaikoResult;
|
||||
|
||||
/// <summary>
|
||||
/// The score value for the combo portion of the score.
|
||||
/// The result value for the combo portion of the score.
|
||||
/// </summary>
|
||||
public int ScoreValue => NumericResultForScore(TaikoResult);
|
||||
public int ResultValueForScore => NumericResultForScore(TaikoResult);
|
||||
|
||||
/// <summary>
|
||||
/// The score value for the accuracy portion of the score.
|
||||
/// The result value for the accuracy portion of the score.
|
||||
/// </summary>
|
||||
public int AccuracyScoreValue => NumericResultForAccuracy(TaikoResult);
|
||||
public int ResultValueForAccuracy => NumericResultForAccuracy(TaikoResult);
|
||||
|
||||
/// <summary>
|
||||
/// The maximum score value for the combo portion of the score.
|
||||
/// The maximum result value for the combo portion of the score.
|
||||
/// </summary>
|
||||
public int MaxScoreValue => NumericResultForScore(MAX_HIT_RESULT);
|
||||
public int MaxResultValueForScore => NumericResultForScore(MAX_HIT_RESULT);
|
||||
|
||||
/// <summary>
|
||||
/// The maximum score value for the accuracy portion of the score.
|
||||
/// The maximum result value for the accuracy portion of the score.
|
||||
/// </summary>
|
||||
public int MaxAccuracyScoreValue => NumericResultForAccuracy(MAX_HIT_RESULT);
|
||||
public int MaxResultValueForAccuracy => NumericResultForAccuracy(MAX_HIT_RESULT);
|
||||
|
||||
public override string ResultString => TaikoResult.GetDescription();
|
||||
|
||||
public override string MaxResultString => MAX_HIT_RESULT.GetDescription();
|
||||
|
||||
/// <summary>
|
||||
/// Whether this Judgement has a secondary hit in the case of finishers.
|
||||
@ -43,11 +48,11 @@ namespace osu.Game.Modes.Taiko.Judgements
|
||||
public bool SecondHit;
|
||||
|
||||
/// <summary>
|
||||
/// Computes the numeric score value for the combo portion of the score.
|
||||
/// Computes the numeric result value for the combo portion of the score.
|
||||
/// For the accuracy portion of the score (including accuracy percentage), see <see cref="NumericResultForAccuracy(TaikoHitResult)"/>.
|
||||
/// </summary>
|
||||
/// <param name="result">The result to compute the score value for.</param>
|
||||
/// <returns>The numeric score value.</returns>
|
||||
/// <param name="result">The result to compute the value for.</param>
|
||||
/// <returns>The numeric result value.</returns>
|
||||
protected virtual int NumericResultForScore(TaikoHitResult result)
|
||||
{
|
||||
switch (result)
|
||||
@ -62,11 +67,11 @@ namespace osu.Game.Modes.Taiko.Judgements
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Computes the numeric score value for the accuracy portion of the score.
|
||||
/// Computes the numeric result value for the accuracy portion of the score.
|
||||
/// For the combo portion of the score, see <see cref="NumericResultForScore(TaikoHitResult)"/>.
|
||||
/// </summary>
|
||||
/// <param name="result">The result to compute the score value for.</param>
|
||||
/// <returns>The numeric score value.</returns>
|
||||
/// <param name="result">The result to compute the value for.</param>
|
||||
/// <returns>The numeric result value.</returns>
|
||||
protected virtual int NumericResultForAccuracy(TaikoHitResult result)
|
||||
{
|
||||
switch (result)
|
@ -1,39 +0,0 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
using osu.Framework.Graphics.Transforms;
|
||||
using OpenTK;
|
||||
|
||||
namespace osu.Game.Modes.Taiko.Objects.Drawable
|
||||
{
|
||||
internal class DrawableTaikoHit : Sprite
|
||||
{
|
||||
private readonly TaikoHitObject h;
|
||||
|
||||
public DrawableTaikoHit(TaikoHitObject h)
|
||||
{
|
||||
this.h = h;
|
||||
|
||||
Origin = Anchor.Centre;
|
||||
Scale = new Vector2(0.2f);
|
||||
RelativePositionAxes = Axes.Both;
|
||||
Position = new Vector2(1.1f, 0.5f);
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(TextureStore textures)
|
||||
{
|
||||
Texture = textures.Get(@"Menu/logo");
|
||||
|
||||
const double duration = 0;
|
||||
|
||||
Transforms.Add(new TransformPositionX { StartTime = h.StartTime - 200, EndTime = h.StartTime, StartValue = 1.1f, EndValue = 0.1f });
|
||||
Transforms.Add(new TransformAlpha { StartTime = h.StartTime + duration + 200, EndTime = h.StartTime + duration + 400, StartValue = 1, EndValue = 0 });
|
||||
Expire(true);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Modes.Objects.Drawables;
|
||||
using osu.Game.Modes.Taiko.Judgements;
|
||||
|
||||
namespace osu.Game.Modes.Taiko.Objects.Drawable
|
||||
{
|
||||
public abstract class DrawableTaikoHitObject : DrawableHitObject<TaikoHitObject, TaikoJudgement>
|
||||
{
|
||||
protected DrawableTaikoHitObject(TaikoHitObject hitObject)
|
||||
: base(hitObject)
|
||||
{
|
||||
Anchor = Anchor.CentreLeft;
|
||||
Origin = Anchor.Centre;
|
||||
|
||||
RelativePositionAxes = Axes.X;
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
LifetimeStart = HitObject.StartTime - HitObject.PreEmpt * 2;
|
||||
LifetimeEnd = HitObject.StartTime + HitObject.PreEmpt;
|
||||
|
||||
base.LoadComplete();
|
||||
}
|
||||
|
||||
protected override TaikoJudgement CreateJudgement() => new TaikoJudgement();
|
||||
|
||||
/// <summary>
|
||||
/// Sets the scroll position of the DrawableHitObject relative to the offset between
|
||||
/// a time value and the HitObject's StartTime.
|
||||
/// </summary>
|
||||
/// <param name="time"></param>
|
||||
protected virtual void UpdateScrollPosition(double time)
|
||||
{
|
||||
MoveToX((float)((HitObject.StartTime - time) / HitObject.PreEmpt));
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
UpdateScrollPosition(Time.Current);
|
||||
}
|
||||
}
|
||||
}
|
35
osu.Game.Modes.Taiko/Objects/Hit.cs
Normal file
35
osu.Game.Modes.Taiko/Objects/Hit.cs
Normal file
@ -0,0 +1,35 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Game.Beatmaps.Timing;
|
||||
using osu.Game.Database;
|
||||
|
||||
namespace osu.Game.Modes.Taiko.Objects
|
||||
{
|
||||
public class Hit : TaikoHitObject
|
||||
{
|
||||
/// <summary>
|
||||
/// The hit window that results in a "GREAT" hit.
|
||||
/// </summary>
|
||||
public double HitWindowGreat = 35;
|
||||
|
||||
/// <summary>
|
||||
/// The hit window that results in a "GOOD" hit.
|
||||
/// </summary>
|
||||
public double HitWindowGood = 80;
|
||||
|
||||
/// <summary>
|
||||
/// The hit window that results in a "MISS".
|
||||
/// </summary>
|
||||
public double HitWindowMiss = 95;
|
||||
|
||||
public override void ApplyDefaults(TimingInfo timing, BeatmapDifficulty difficulty)
|
||||
{
|
||||
base.ApplyDefaults(timing, difficulty);
|
||||
|
||||
HitWindowGreat = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 50, 35, 20);
|
||||
HitWindowGood = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 120, 80, 50);
|
||||
HitWindowMiss = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 135, 95, 70);
|
||||
}
|
||||
}
|
||||
}
|
@ -7,37 +7,28 @@ using osu.Game.Modes.Objects;
|
||||
|
||||
namespace osu.Game.Modes.Taiko.Objects
|
||||
{
|
||||
public class TaikoHitObject : HitObject
|
||||
public abstract class TaikoHitObject : HitObject
|
||||
{
|
||||
/// <summary>
|
||||
/// HitCircle radius.
|
||||
/// </summary>
|
||||
public const float CIRCLE_RADIUS = 64;
|
||||
|
||||
/// <summary>
|
||||
/// The hit window that results in a "GREAT" hit.
|
||||
/// </summary>
|
||||
public double HitWindowGreat = 35;
|
||||
|
||||
/// <summary>
|
||||
/// The hit window that results in a "GOOD" hit.
|
||||
/// </summary>
|
||||
public double HitWindowGood = 80;
|
||||
|
||||
/// <summary>
|
||||
/// The hit window that results in a "MISS".
|
||||
/// </summary>
|
||||
public double HitWindowMiss = 95;
|
||||
|
||||
/// <summary>
|
||||
/// The time to scroll in the HitObject.
|
||||
/// </summary>
|
||||
public double PreEmpt;
|
||||
|
||||
/// <summary>
|
||||
/// Whether this HitObject is accented.
|
||||
/// Accented hit objects give more points for hitting the hit object with both keys.
|
||||
/// </summary>
|
||||
public bool Accented;
|
||||
|
||||
/// <summary>
|
||||
/// Whether this HitObject is in Kiai time.
|
||||
/// </summary>
|
||||
public bool Kiai;
|
||||
public bool Kiai { get; protected set; }
|
||||
|
||||
public override void ApplyDefaults(TimingInfo timing, BeatmapDifficulty difficulty)
|
||||
{
|
||||
@ -50,10 +41,6 @@ namespace osu.Game.Modes.Taiko.Objects
|
||||
|
||||
if (overridePoint != null)
|
||||
Kiai |= overridePoint.KiaiMode;
|
||||
|
||||
HitWindowGreat = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 50, 35, 20);
|
||||
HitWindowGood = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 120, 80, 50);
|
||||
HitWindowMiss = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 135, 95, 70);
|
||||
}
|
||||
}
|
||||
}
|
263
osu.Game.Modes.Taiko/Scoring/TaikoScoreProcessor.cs
Normal file
263
osu.Game.Modes.Taiko/Scoring/TaikoScoreProcessor.cs
Normal file
@ -0,0 +1,263 @@
|
||||
// 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;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Modes.Objects.Drawables;
|
||||
using osu.Game.Modes.Scoring;
|
||||
using osu.Game.Modes.Taiko.Judgements;
|
||||
using osu.Game.Modes.Taiko.Objects;
|
||||
using osu.Game.Modes.UI;
|
||||
using OpenTK;
|
||||
|
||||
namespace osu.Game.Modes.Taiko.Scoring
|
||||
{
|
||||
internal class TaikoScoreProcessor : ScoreProcessor<TaikoHitObject, TaikoJudgement>
|
||||
{
|
||||
/// <summary>
|
||||
/// The maximum score achievable.
|
||||
/// Does _not_ include bonus score - for bonus score see <see cref="bonusScore"/>.
|
||||
/// </summary>
|
||||
private const int max_score = 1000000;
|
||||
|
||||
/// <summary>
|
||||
/// The amount of the score attributed to combo.
|
||||
/// </summary>
|
||||
private const double combo_portion_max = max_score * 0.2;
|
||||
|
||||
/// <summary>
|
||||
/// The amount of the score attributed to accuracy.
|
||||
/// </summary>
|
||||
private const double accuracy_portion_max = max_score * 0.8;
|
||||
|
||||
/// <summary>
|
||||
/// The factor used to determine relevance of combos.
|
||||
/// </summary>
|
||||
private const double combo_base = 4;
|
||||
|
||||
/// <summary>
|
||||
/// The HP awarded by a <see cref="TaikoHitResult.Great"/> hit.
|
||||
/// </summary>
|
||||
private const double hp_hit_great = 0.03;
|
||||
|
||||
/// <summary>
|
||||
/// The HP awarded for a <see cref="TaikoHitResult.Good"/> hit.
|
||||
/// </summary>
|
||||
private const double hp_hit_good = 0.011;
|
||||
|
||||
/// <summary>
|
||||
/// The minimum HP deducted for a <see cref="HitResult.Miss"/>.
|
||||
/// This occurs when HP Drain = 0.
|
||||
/// </summary>
|
||||
private const double hp_miss_min = -0.0018;
|
||||
|
||||
/// <summary>
|
||||
/// The median HP deducted for a <see cref="HitResult.Miss"/>.
|
||||
/// This occurs when HP Drain = 5.
|
||||
/// </summary>
|
||||
private const double hp_miss_mid = -0.0075;
|
||||
|
||||
/// <summary>
|
||||
/// The maximum HP deducted for a <see cref="HitResult.Miss"/>.
|
||||
/// This occurs when HP Drain = 10.
|
||||
/// </summary>
|
||||
private const double hp_miss_max = -0.12;
|
||||
|
||||
/// <summary>
|
||||
/// The HP awarded for a <see cref="DrumRollTick"/> hit.
|
||||
/// <para>
|
||||
/// <see cref="DrumRollTick"/> hits award less HP as they're more spammable, although in hindsight
|
||||
/// this probably awards too little HP and is kept at this value for now for compatibility.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
private const double hp_hit_tick = 0.00000003;
|
||||
|
||||
/// <summary>
|
||||
/// Taiko fails at the end of the map if the player has not half-filled their HP bar.
|
||||
/// </summary>
|
||||
public override bool HasFailed => totalHits == maxTotalHits && Health.Value <= 0.5;
|
||||
|
||||
/// <summary>
|
||||
/// The cumulative combo portion of the score.
|
||||
/// </summary>
|
||||
private double comboScore => combo_portion_max * comboPortion / maxComboPortion;
|
||||
|
||||
/// <summary>
|
||||
/// The cumulative accuracy portion of the score.
|
||||
/// </summary>
|
||||
private double accuracyScore => accuracy_portion_max * Math.Pow(Accuracy, 3.6) * totalHits / maxTotalHits;
|
||||
|
||||
/// <summary>
|
||||
/// The cumulative bonus score.
|
||||
/// This is added on top of <see cref="max_score"/>, thus the total score can exceed <see cref="max_score"/>.
|
||||
/// </summary>
|
||||
private double bonusScore;
|
||||
|
||||
/// <summary>
|
||||
/// The multiple of the original score added to the combo portion of the score
|
||||
/// for correctly hitting an accented hit object with both keys.
|
||||
/// </summary>
|
||||
private double accentedHitScale;
|
||||
|
||||
private double hpIncreaseTick;
|
||||
private double hpIncreaseGreat;
|
||||
private double hpIncreaseGood;
|
||||
private double hpIncreaseMiss;
|
||||
|
||||
private double maxComboPortion;
|
||||
private double comboPortion;
|
||||
private int maxTotalHits;
|
||||
private int totalHits;
|
||||
|
||||
public TaikoScoreProcessor()
|
||||
{
|
||||
}
|
||||
|
||||
public TaikoScoreProcessor(HitRenderer<TaikoHitObject, TaikoJudgement> hitRenderer)
|
||||
: base(hitRenderer)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void ComputeTargets(Beatmap<TaikoHitObject> beatmap)
|
||||
{
|
||||
double hpMultiplierNormal = 1 / (hp_hit_great * beatmap.HitObjects.FindAll(o => o is Hit).Count * BeatmapDifficulty.DifficultyRange(beatmap.BeatmapInfo.Difficulty.DrainRate, 0.5, 0.75, 0.98));
|
||||
|
||||
hpIncreaseTick = hp_hit_tick;
|
||||
hpIncreaseGreat = hpMultiplierNormal * hp_hit_great;
|
||||
hpIncreaseGood = hpMultiplierNormal * hp_hit_good;
|
||||
hpIncreaseMiss = BeatmapDifficulty.DifficultyRange(beatmap.BeatmapInfo.Difficulty.DrainRate, hp_miss_min, hp_miss_mid, hp_miss_max);
|
||||
|
||||
var accentedHits = beatmap.HitObjects.FindAll(o => o is Hit && o.Accented);
|
||||
|
||||
// This is a linear function that awards:
|
||||
// 10 times bonus points for hitting an accented hit object with both keys with 30 accented hit objects in the map
|
||||
// 3 times bonus points for hitting an accented hit object with both keys with 120 accented hit objects in the map
|
||||
accentedHitScale = -7d / 90d * MathHelper.Clamp(accentedHits.Count, 30, 120) + 111d / 9d;
|
||||
|
||||
foreach (var obj in beatmap.HitObjects)
|
||||
{
|
||||
if (obj is Hit)
|
||||
{
|
||||
AddJudgement(new TaikoJudgement
|
||||
{
|
||||
Result = HitResult.Hit,
|
||||
TaikoResult = TaikoHitResult.Great,
|
||||
SecondHit = obj.Accented
|
||||
});
|
||||
}
|
||||
else if (obj is DrumRoll)
|
||||
{
|
||||
for (int i = 0; i < ((DrumRoll)obj).TotalTicks; i++)
|
||||
{
|
||||
AddJudgement(new TaikoDrumRollTickJudgement
|
||||
{
|
||||
Result = HitResult.Hit,
|
||||
TaikoResult = TaikoHitResult.Great,
|
||||
SecondHit = obj.Accented
|
||||
});
|
||||
}
|
||||
|
||||
AddJudgement(new TaikoJudgement
|
||||
{
|
||||
Result = HitResult.Hit,
|
||||
TaikoResult = TaikoHitResult.Great,
|
||||
SecondHit = obj.Accented
|
||||
});
|
||||
}
|
||||
else if (obj is Bash)
|
||||
{
|
||||
AddJudgement(new TaikoJudgement
|
||||
{
|
||||
Result = HitResult.Hit,
|
||||
TaikoResult = TaikoHitResult.Great
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
maxTotalHits = totalHits;
|
||||
maxComboPortion = comboPortion;
|
||||
}
|
||||
|
||||
protected override void OnNewJugement(TaikoJudgement judgement)
|
||||
{
|
||||
bool isTick = judgement is TaikoDrumRollTickJudgement;
|
||||
|
||||
// Don't consider ticks as a type of hit that counts towards map completion
|
||||
if (!isTick)
|
||||
totalHits++;
|
||||
|
||||
// Apply score changes
|
||||
if (judgement.Result == HitResult.Hit)
|
||||
{
|
||||
double baseValue = judgement.ResultValueForScore;
|
||||
|
||||
// Add bonus points for hitting an accented hit object with the second key
|
||||
if (judgement.SecondHit)
|
||||
baseValue += baseValue * accentedHitScale;
|
||||
|
||||
// Add score to portions
|
||||
if (isTick)
|
||||
bonusScore += baseValue;
|
||||
else
|
||||
{
|
||||
Combo.Value++;
|
||||
|
||||
// A relevance factor that needs to be applied to make higher combos more relevant
|
||||
// Value is capped at 400 combo
|
||||
double comboRelevance = Math.Min(Math.Log(400, combo_base), Math.Max(0.5, Math.Log(Combo.Value, combo_base)));
|
||||
|
||||
comboPortion += baseValue * comboRelevance;
|
||||
}
|
||||
}
|
||||
|
||||
// Apply HP changes
|
||||
switch (judgement.Result)
|
||||
{
|
||||
case HitResult.Miss:
|
||||
// Missing ticks shouldn't drop HP
|
||||
if (!isTick)
|
||||
Health.Value += hpIncreaseMiss;
|
||||
break;
|
||||
case HitResult.Hit:
|
||||
switch (judgement.TaikoResult)
|
||||
{
|
||||
case TaikoHitResult.Good:
|
||||
Health.Value += hpIncreaseGood;
|
||||
break;
|
||||
case TaikoHitResult.Great:
|
||||
if (isTick)
|
||||
Health.Value += hpIncreaseTick;
|
||||
else
|
||||
Health.Value += hpIncreaseGreat;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// Compute the new score + accuracy
|
||||
int scoreForAccuracy = 0;
|
||||
int maxScoreForAccuracy = 0;
|
||||
|
||||
foreach (var j in Judgements)
|
||||
{
|
||||
scoreForAccuracy += j.ResultValueForAccuracy;
|
||||
maxScoreForAccuracy = j.MaxResultValueForAccuracy;
|
||||
}
|
||||
|
||||
Accuracy.Value = (double)scoreForAccuracy / maxScoreForAccuracy;
|
||||
TotalScore.Value = comboScore + accuracyScore + bonusScore;
|
||||
}
|
||||
|
||||
protected override void Reset()
|
||||
{
|
||||
base.Reset();
|
||||
|
||||
Health.Value = 0;
|
||||
|
||||
bonusScore = 0;
|
||||
comboPortion = 0;
|
||||
totalHits = 0;
|
||||
}
|
||||
}
|
||||
}
|
@ -10,6 +10,8 @@ using osu.Game.Modes.Taiko.UI;
|
||||
using osu.Game.Modes.UI;
|
||||
using osu.Game.Screens.Play;
|
||||
using System.Collections.Generic;
|
||||
using osu.Game.Modes.Scoring;
|
||||
using osu.Game.Modes.Taiko.Scoring;
|
||||
|
||||
namespace osu.Game.Modes.Taiko
|
||||
{
|
||||
|
@ -1,25 +0,0 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Game.Modes.Taiko.Judgements;
|
||||
using osu.Game.Modes.Taiko.Objects;
|
||||
using osu.Game.Modes.UI;
|
||||
|
||||
namespace osu.Game.Modes.Taiko
|
||||
{
|
||||
internal class TaikoScoreProcessor : ScoreProcessor<TaikoHitObject, TaikoJudgementInfo>
|
||||
{
|
||||
public TaikoScoreProcessor()
|
||||
{
|
||||
}
|
||||
|
||||
public TaikoScoreProcessor(HitRenderer<TaikoHitObject, TaikoJudgementInfo> hitRenderer)
|
||||
: base(hitRenderer)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void UpdateCalculations(TaikoJudgementInfo newJudgement)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
57
osu.Game.Modes.Taiko/UI/DrawableTaikoJudgement.cs
Normal file
57
osu.Game.Modes.Taiko/UI/DrawableTaikoJudgement.cs
Normal file
@ -0,0 +1,57 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Game.Modes.Taiko.Judgements;
|
||||
using osu.Game.Modes.Objects.Drawables;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Modes.Judgements;
|
||||
|
||||
namespace osu.Game.Modes.Taiko.UI
|
||||
{
|
||||
/// <summary>
|
||||
/// Text that is shown as judgement when a hit object is hit or missed.
|
||||
/// </summary>
|
||||
public class DrawableTaikoJudgement : DrawableJudgement<TaikoJudgement>
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a new judgement text.
|
||||
/// </summary>
|
||||
/// <param name="judgement">The judgement to visualise.</param>
|
||||
public DrawableTaikoJudgement(TaikoJudgement judgement)
|
||||
: base(judgement)
|
||||
{
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
switch (Judgement.Result)
|
||||
{
|
||||
case HitResult.Hit:
|
||||
switch (Judgement.TaikoResult)
|
||||
{
|
||||
case TaikoHitResult.Good:
|
||||
Colour = colours.GreenLight;
|
||||
break;
|
||||
case TaikoHitResult.Great:
|
||||
Colour = colours.BlueLight;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
switch (Judgement.Result)
|
||||
{
|
||||
case HitResult.Hit:
|
||||
MoveToY(-100, 500);
|
||||
break;
|
||||
}
|
||||
|
||||
base.LoadComplete();
|
||||
}
|
||||
}
|
||||
}
|
78
osu.Game.Modes.Taiko/UI/HitExplosion.cs
Normal file
78
osu.Game.Modes.Taiko/UI/HitExplosion.cs
Normal file
@ -0,0 +1,78 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Transforms;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Modes.Taiko.Judgements;
|
||||
using osu.Game.Modes.Taiko.Objects;
|
||||
|
||||
namespace osu.Game.Modes.Taiko.UI
|
||||
{
|
||||
/// <summary>
|
||||
/// A circle explodes from the hit target to indicate a hitobject has been hit.
|
||||
/// </summary>
|
||||
internal class HitExplosion : CircularContainer
|
||||
{
|
||||
private readonly TaikoJudgement judgement;
|
||||
private readonly Box innerFill;
|
||||
|
||||
public HitExplosion(TaikoJudgement judgement)
|
||||
{
|
||||
this.judgement = judgement;
|
||||
|
||||
Size = new Vector2(TaikoHitObject.CIRCLE_RADIUS * 2);
|
||||
|
||||
Anchor = Anchor.Centre;
|
||||
Origin = Anchor.Centre;
|
||||
|
||||
RelativePositionAxes = Axes.Both;
|
||||
|
||||
BorderColour = Color4.White;
|
||||
BorderThickness = 1;
|
||||
|
||||
Alpha = 0.15f;
|
||||
Masking = true;
|
||||
|
||||
Children = new[]
|
||||
{
|
||||
innerFill = new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
if (judgement.SecondHit)
|
||||
Size *= 1.5f;
|
||||
|
||||
switch (judgement.TaikoResult)
|
||||
{
|
||||
case TaikoHitResult.Good:
|
||||
innerFill.Colour = colours.Green;
|
||||
break;
|
||||
case TaikoHitResult.Great:
|
||||
innerFill.Colour = colours.Blue;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
ScaleTo(5f, 1000, EasingTypes.OutQuint);
|
||||
FadeOut(500);
|
||||
|
||||
Expire();
|
||||
}
|
||||
}
|
||||
}
|
105
osu.Game.Modes.Taiko/UI/HitTarget.cs
Normal file
105
osu.Game.Modes.Taiko/UI/HitTarget.cs
Normal file
@ -0,0 +1,105 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Modes.Taiko.Objects;
|
||||
|
||||
namespace osu.Game.Modes.Taiko.UI
|
||||
{
|
||||
/// <summary>
|
||||
/// A component that is displayed at the hit position in the taiko playfield.
|
||||
/// </summary>
|
||||
internal class HitTarget : Container
|
||||
{
|
||||
/// <summary>
|
||||
/// Diameter of normal hit object circles.
|
||||
/// </summary>
|
||||
private const float normal_diameter = TaikoHitObject.CIRCLE_RADIUS * 2 * TaikoPlayfield.PLAYFIELD_SCALE;
|
||||
|
||||
/// <summary>
|
||||
/// Diameter of finisher hit object circles.
|
||||
/// </summary>
|
||||
private const float finisher_diameter = normal_diameter * 1.5f;
|
||||
|
||||
/// <summary>
|
||||
/// The 1px inner border of the taiko playfield.
|
||||
/// </summary>
|
||||
private const float border_offset = 1;
|
||||
|
||||
/// <summary>
|
||||
/// Thickness of all drawn line pieces.
|
||||
/// </summary>
|
||||
private const float border_thickness = 2.5f;
|
||||
|
||||
public HitTarget()
|
||||
{
|
||||
RelativeSizeAxes = Axes.Y;
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Box
|
||||
{
|
||||
Name = "Bar Upper",
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Y = border_offset,
|
||||
Size = new Vector2(border_thickness, (TaikoPlayfield.PlayfieldHeight - finisher_diameter) / 2f - border_offset),
|
||||
Alpha = 0.1f
|
||||
},
|
||||
new CircularContainer
|
||||
{
|
||||
Name = "Finisher Ring",
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Size = new Vector2(finisher_diameter),
|
||||
Masking = true,
|
||||
BorderColour = Color4.White,
|
||||
BorderThickness = border_thickness,
|
||||
Alpha = 0.1f,
|
||||
Children = new[]
|
||||
{
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Alpha = 0,
|
||||
AlwaysPresent = true
|
||||
}
|
||||
}
|
||||
},
|
||||
new CircularContainer
|
||||
{
|
||||
Name = "Normal Ring",
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Size = new Vector2(normal_diameter),
|
||||
Masking = true,
|
||||
BorderColour = Color4.White,
|
||||
BorderThickness = border_thickness,
|
||||
Alpha = 0.5f,
|
||||
Children = new[]
|
||||
{
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Alpha = 0,
|
||||
AlwaysPresent = true
|
||||
}
|
||||
}
|
||||
},
|
||||
new Box
|
||||
{
|
||||
Name = "Bar Lower",
|
||||
Anchor = Anchor.BottomCentre,
|
||||
Origin = Anchor.BottomCentre,
|
||||
Y = -border_offset,
|
||||
Size = new Vector2(border_thickness, (TaikoPlayfield.PlayfieldHeight - finisher_diameter) / 2f - border_offset),
|
||||
Alpha = 0.1f
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
149
osu.Game.Modes.Taiko/UI/InputDrum.cs
Normal file
149
osu.Game.Modes.Taiko/UI/InputDrum.cs
Normal file
@ -0,0 +1,149 @@
|
||||
// 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;
|
||||
using OpenTK;
|
||||
using OpenTK.Input;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
using osu.Framework.Graphics.Transforms;
|
||||
using osu.Framework.Input;
|
||||
using osu.Game.Graphics;
|
||||
|
||||
namespace osu.Game.Modes.Taiko.UI
|
||||
{
|
||||
/// <summary>
|
||||
/// A component of the playfield that captures input and displays input as a drum.
|
||||
/// </summary>
|
||||
internal class InputDrum : Container
|
||||
{
|
||||
public InputDrum()
|
||||
{
|
||||
Size = new Vector2(TaikoPlayfield.PlayfieldHeight);
|
||||
|
||||
const float middle_split = 10;
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new TaikoHalfDrum(false)
|
||||
{
|
||||
Name = "Left Half",
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.CentreRight,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
X = -middle_split / 2,
|
||||
RimKey = Key.D,
|
||||
CentreKey = Key.F
|
||||
},
|
||||
new TaikoHalfDrum(true)
|
||||
{
|
||||
Name = "Right Half",
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.CentreLeft,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
X = middle_split / 2,
|
||||
Position = new Vector2(-1f, 0),
|
||||
RimKey = Key.K,
|
||||
CentreKey = Key.J
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A half-drum. Contains one centre and one rim hit.
|
||||
/// </summary>
|
||||
private class TaikoHalfDrum : Container
|
||||
{
|
||||
/// <summary>
|
||||
/// The key to be used for the rim of the half-drum.
|
||||
/// </summary>
|
||||
public Key RimKey;
|
||||
|
||||
/// <summary>
|
||||
/// The key to be used for the centre of the half-drum.
|
||||
/// </summary>
|
||||
public Key CentreKey;
|
||||
|
||||
private readonly Sprite rim;
|
||||
private readonly Sprite rimHit;
|
||||
private readonly Sprite centre;
|
||||
private readonly Sprite centreHit;
|
||||
|
||||
public TaikoHalfDrum(bool flipped)
|
||||
{
|
||||
Masking = true;
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
rim = new Sprite
|
||||
{
|
||||
Anchor = flipped ? Anchor.CentreLeft : Anchor.CentreRight,
|
||||
Origin = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.Both
|
||||
},
|
||||
rimHit = new Sprite
|
||||
{
|
||||
Anchor = flipped ? Anchor.CentreLeft : Anchor.CentreRight,
|
||||
Origin = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Alpha = 0,
|
||||
BlendingMode = BlendingMode.Additive,
|
||||
},
|
||||
centre = new Sprite
|
||||
{
|
||||
Anchor = flipped ? Anchor.CentreLeft : Anchor.CentreRight,
|
||||
Origin = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Size = new Vector2(0.7f)
|
||||
},
|
||||
centreHit = new Sprite
|
||||
{
|
||||
Anchor = flipped ? Anchor.CentreLeft : Anchor.CentreRight,
|
||||
Origin = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Size = new Vector2(0.7f),
|
||||
Alpha = 0,
|
||||
BlendingMode = BlendingMode.Additive
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(TextureStore textures, OsuColour colours)
|
||||
{
|
||||
rim.Texture = textures.Get(@"Play/Taiko/taiko-drum-outer");
|
||||
rimHit.Texture = textures.Get(@"Play/Taiko/taiko-drum-outer-hit");
|
||||
centre.Texture = textures.Get(@"Play/Taiko/taiko-drum-inner");
|
||||
centreHit.Texture = textures.Get(@"Play/Taiko/taiko-drum-inner-hit");
|
||||
|
||||
rimHit.Colour = colours.Blue;
|
||||
centreHit.Colour = colours.Pink;
|
||||
}
|
||||
|
||||
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
||||
{
|
||||
if (args.Repeat)
|
||||
return false;
|
||||
|
||||
Drawable target = null;
|
||||
|
||||
if (args.Key == CentreKey)
|
||||
target = centreHit;
|
||||
else if (args.Key == RimKey)
|
||||
target = rimHit;
|
||||
|
||||
if (target != null)
|
||||
{
|
||||
target.FadeTo(Math.Min(target.Alpha + 0.4f, 1), 40, EasingTypes.OutQuint);
|
||||
target.Delay(40);
|
||||
target.FadeOut(600, EasingTypes.OutQuint);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -3,14 +3,16 @@
|
||||
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Modes.Objects.Drawables;
|
||||
using osu.Game.Modes.Scoring;
|
||||
using osu.Game.Modes.Taiko.Beatmaps;
|
||||
using osu.Game.Modes.Taiko.Judgements;
|
||||
using osu.Game.Modes.Taiko.Objects;
|
||||
using osu.Game.Modes.Taiko.Scoring;
|
||||
using osu.Game.Modes.UI;
|
||||
|
||||
namespace osu.Game.Modes.Taiko.UI
|
||||
{
|
||||
public class TaikoHitRenderer : HitRenderer<TaikoHitObject, TaikoJudgementInfo>
|
||||
public class TaikoHitRenderer : HitRenderer<TaikoHitObject, TaikoJudgement>
|
||||
{
|
||||
public TaikoHitRenderer(WorkingBeatmap beatmap)
|
||||
: base(beatmap)
|
||||
@ -23,8 +25,8 @@ namespace osu.Game.Modes.Taiko.UI
|
||||
|
||||
protected override IBeatmapProcessor<TaikoHitObject> CreateBeatmapProcessor() => new TaikoBeatmapProcessor();
|
||||
|
||||
protected override Playfield<TaikoHitObject, TaikoJudgementInfo> CreatePlayfield() => new TaikoPlayfield();
|
||||
protected override Playfield<TaikoHitObject, TaikoJudgement> CreatePlayfield() => new TaikoPlayfield();
|
||||
|
||||
protected override DrawableHitObject<TaikoHitObject, TaikoJudgementInfo> GetVisualRepresentation(TaikoHitObject h) => null;
|
||||
protected override DrawableHitObject<TaikoHitObject, TaikoJudgement> GetVisualRepresentation(TaikoHitObject h) => null;
|
||||
}
|
||||
}
|
||||
|
@ -4,38 +4,192 @@
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
using osu.Game.Modes.Taiko.Objects;
|
||||
using osu.Game.Modes.UI;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Game.Modes.Taiko.Judgements;
|
||||
using osu.Game.Modes.Objects.Drawables;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics.Primitives;
|
||||
|
||||
namespace osu.Game.Modes.Taiko.UI
|
||||
{
|
||||
public class TaikoPlayfield : Playfield<TaikoHitObject, TaikoJudgementInfo>
|
||||
public class TaikoPlayfield : Playfield<TaikoHitObject, TaikoJudgement>
|
||||
{
|
||||
/// <summary>
|
||||
/// The default play field height.
|
||||
/// </summary>
|
||||
public const float PLAYFIELD_BASE_HEIGHT = 242;
|
||||
|
||||
/// <summary>
|
||||
/// The play field height scale.
|
||||
/// </summary>
|
||||
public const float PLAYFIELD_SCALE = 0.65f;
|
||||
|
||||
/// <summary>
|
||||
/// The play field height after scaling.
|
||||
/// </summary>
|
||||
public static float PlayfieldHeight => PLAYFIELD_BASE_HEIGHT * PLAYFIELD_SCALE;
|
||||
|
||||
/// <summary>
|
||||
/// The offset from <see cref="left_area_size"/> which the center of the hit target lies at.
|
||||
/// </summary>
|
||||
private const float hit_target_offset = 80;
|
||||
|
||||
/// <summary>
|
||||
/// The size of the left area of the playfield. This area contains the input drum.
|
||||
/// </summary>
|
||||
private const float left_area_size = 240;
|
||||
|
||||
protected override Container<Drawable> Content => hitObjectContainer;
|
||||
|
||||
private readonly Container<HitExplosion> hitExplosionContainer;
|
||||
//private Container<DrawableBarLine> barLineContainer;
|
||||
private readonly Container<DrawableTaikoJudgement> judgementContainer;
|
||||
|
||||
private readonly Container hitObjectContainer;
|
||||
//private Container topLevelHitContainer;
|
||||
private readonly Container leftBackgroundContainer;
|
||||
private readonly Container rightBackgroundContainer;
|
||||
private readonly Box leftBackground;
|
||||
private readonly Box rightBackground;
|
||||
|
||||
public TaikoPlayfield()
|
||||
{
|
||||
RelativeSizeAxes = Axes.X;
|
||||
Size = new Vector2(1, 100);
|
||||
Anchor = Anchor.Centre;
|
||||
Origin = Anchor.Centre;
|
||||
Height = PlayfieldHeight;
|
||||
|
||||
AddInternal(new Drawable[]
|
||||
{
|
||||
rightBackgroundContainer = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
BorderThickness = 2,
|
||||
Masking = true,
|
||||
EdgeEffect = new EdgeEffect
|
||||
{
|
||||
Type = EdgeEffectType.Shadow,
|
||||
Colour = Color4.Black.Opacity(0.2f),
|
||||
Radius = 5,
|
||||
},
|
||||
Children = new Drawable[]
|
||||
{
|
||||
rightBackground = new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Alpha = 0.6f
|
||||
},
|
||||
}
|
||||
},
|
||||
new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Padding = new MarginPadding { Left = left_area_size },
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Container
|
||||
{
|
||||
Padding = new MarginPadding { Left = hit_target_offset },
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
hitExplosionContainer = new Container<HitExplosion>
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.Centre,
|
||||
Size = new Vector2(TaikoHitObject.CIRCLE_RADIUS * 2),
|
||||
Scale = new Vector2(PLAYFIELD_SCALE),
|
||||
BlendingMode = BlendingMode.Additive
|
||||
},
|
||||
//barLineContainer = new Container<DrawableBarLine>
|
||||
//{
|
||||
// RelativeSizeAxes = Axes.Both,
|
||||
//},
|
||||
new HitTarget
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.Centre,
|
||||
},
|
||||
hitObjectContainer = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
},
|
||||
judgementContainer = new Container<DrawableTaikoJudgement>
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
BlendingMode = BlendingMode.Additive
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
leftBackgroundContainer = new Container
|
||||
{
|
||||
Size = new Vector2(left_area_size, PlayfieldHeight),
|
||||
BorderThickness = 1,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
leftBackground = new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
},
|
||||
new InputDrum
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
RelativePositionAxes = Axes.X,
|
||||
Position = new Vector2(0.10f, 0),
|
||||
Scale = new Vector2(0.9f)
|
||||
},
|
||||
new Box
|
||||
{
|
||||
Anchor = Anchor.TopRight,
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
Width = 10,
|
||||
ColourInfo = Framework.Graphics.Colour.ColourInfo.GradientHorizontal(Color4.Black.Opacity(0.6f), Color4.Black.Opacity(0)),
|
||||
},
|
||||
}
|
||||
},
|
||||
//topLevelHitContainer = new Container
|
||||
//{
|
||||
// RelativeSizeAxes = Axes.Both,
|
||||
//}
|
||||
});
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(TextureStore textures)
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
Add(new Box { RelativeSizeAxes = Axes.Both, Alpha = 0.5f });
|
||||
leftBackgroundContainer.BorderColour = colours.Gray0;
|
||||
leftBackground.Colour = colours.Gray1;
|
||||
|
||||
Add(new Sprite
|
||||
rightBackgroundContainer.BorderColour = colours.Gray1;
|
||||
rightBackground.Colour = colours.Gray0;
|
||||
}
|
||||
|
||||
public override void Add(DrawableHitObject<TaikoHitObject, TaikoJudgement> h)
|
||||
{
|
||||
h.Depth = (float)h.HitObject.StartTime;
|
||||
|
||||
base.Add(h);
|
||||
}
|
||||
|
||||
public override void OnJudgement(DrawableHitObject<TaikoHitObject, TaikoJudgement> judgedObject)
|
||||
{
|
||||
bool wasHit = judgedObject.Judgement.Result == HitResult.Hit;
|
||||
|
||||
if (wasHit)
|
||||
hitExplosionContainer.Add(new HitExplosion(judgedObject.Judgement));
|
||||
|
||||
judgementContainer.Add(new DrawableTaikoJudgement(judgedObject.Judgement)
|
||||
{
|
||||
Texture = textures.Get(@"Menu/logo"),
|
||||
Origin = Anchor.Centre,
|
||||
Scale = new Vector2(0.2f),
|
||||
RelativePositionAxes = Axes.Both,
|
||||
Position = new Vector2(0.1f, 0.5f),
|
||||
Colour = Color4.Gray
|
||||
Anchor = wasHit ? Anchor.TopLeft : Anchor.CentreLeft,
|
||||
Origin = wasHit ? Anchor.BottomCentre : Anchor.Centre,
|
||||
RelativePositionAxes = Axes.X,
|
||||
X = wasHit ? judgedObject.Position.X : 0,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -49,7 +49,6 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="Beatmaps\TaikoBeatmapConverter.cs" />
|
||||
<Compile Include="Beatmaps\TaikoBeatmapProcessor.cs" />
|
||||
<Compile Include="Judgements\TaikoJudgementInfo.cs" />
|
||||
<Compile Include="Objects\Drawable\Pieces\BashCirclePiece.cs" />
|
||||
<Compile Include="Objects\Drawable\Pieces\CentreHitCirclePiece.cs" />
|
||||
<Compile Include="Objects\Drawable\Pieces\CirclePiece.cs" />
|
||||
@ -57,15 +56,22 @@
|
||||
<Compile Include="Objects\Drawable\Pieces\FinisherPiece.cs" />
|
||||
<Compile Include="Objects\Drawable\Pieces\RimHitCirclePiece.cs" />
|
||||
<Compile Include="Objects\Drawable\Pieces\ScrollingCirclePiece.cs" />
|
||||
<Compile Include="Judgements\TaikoDrumRollTickJudgement.cs" />
|
||||
<Compile Include="Judgements\TaikoJudgement.cs" />
|
||||
<Compile Include="Judgements\TaikoHitResult.cs" />
|
||||
<Compile Include="Objects\Drawable\DrawableTaikoHitObject.cs" />
|
||||
<Compile Include="Objects\Bash.cs" />
|
||||
<Compile Include="Objects\DrumRoll.cs" />
|
||||
<Compile Include="Objects\DrumRollTick.cs" />
|
||||
<Compile Include="Objects\Hit.cs" />
|
||||
<Compile Include="TaikoDifficultyCalculator.cs" />
|
||||
<Compile Include="Objects\Drawable\DrawableTaikoHit.cs" />
|
||||
<Compile Include="Objects\TaikoHitObject.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="TaikoScoreProcessor.cs" />
|
||||
<Compile Include="Scoring\TaikoScoreProcessor.cs" />
|
||||
<Compile Include="UI\HitTarget.cs" />
|
||||
<Compile Include="UI\InputDrum.cs" />
|
||||
<Compile Include="UI\DrawableTaikoJudgement.cs" />
|
||||
<Compile Include="UI\HitExplosion.cs" />
|
||||
<Compile Include="UI\TaikoHitRenderer.cs" />
|
||||
<Compile Include="UI\TaikoPlayfield.cs" />
|
||||
<Compile Include="TaikoRuleset.cs" />
|
||||
@ -83,10 +89,6 @@
|
||||
<Project>{C76BF5B3-985E-4D39-95FE-97C9C879B83A}</Project>
|
||||
<Name>osu.Framework</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\osu.Game.Modes.Osu\osu.Game.Modes.Osu.csproj">
|
||||
<Project>{C92A607B-1FDD-4954-9F92-03FF547D9080}</Project>
|
||||
<Name>osu.Game.Modes.Osu</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\osu.Game\osu.Game.csproj">
|
||||
<Project>{0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}</Project>
|
||||
<Name>osu.Game</Name>
|
||||
|
@ -70,7 +70,7 @@ namespace osu.Game.Tests.Beatmaps.IO
|
||||
Assert.IsTrue(File.Exists(temp));
|
||||
|
||||
var importer = new BeatmapIPCChannel(client);
|
||||
if (!importer.ImportAsync(temp).Wait(1000))
|
||||
if (!importer.ImportAsync(temp).Wait(5000))
|
||||
Assert.Fail(@"IPC took too long to send");
|
||||
|
||||
ensureLoaded(osu);
|
||||
|
@ -8,6 +8,7 @@ using osu.Framework.Platform;
|
||||
using osu.Game.IO.Legacy;
|
||||
using osu.Game.IPC;
|
||||
using osu.Game.Modes;
|
||||
using osu.Game.Modes.Scoring;
|
||||
using SharpCompress.Compressors.LZMA;
|
||||
|
||||
namespace osu.Game.Database
|
||||
|
@ -12,7 +12,7 @@ using osu.Framework.Configuration;
|
||||
|
||||
namespace osu.Game.Graphics.Containers
|
||||
{
|
||||
internal class ParallaxContainer : Container
|
||||
internal class ParallaxContainer : Container, IRequireHighFrequencyMousePosition
|
||||
{
|
||||
public float ParallaxAmount = 0.02f;
|
||||
|
||||
|
@ -28,6 +28,8 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
public OsuTabControl()
|
||||
{
|
||||
TabContainer.Spacing = new Vector2(10f, 0f);
|
||||
|
||||
if (!typeof(T).IsEnum)
|
||||
throw new InvalidOperationException("OsuTabControl only supports enums as the generic type argument");
|
||||
|
||||
@ -142,7 +144,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
text = new OsuSpriteText
|
||||
{
|
||||
Margin = new MarginPadding(5),
|
||||
Margin = new MarginPadding { Top = 5, Bottom = 5 },
|
||||
Origin = Anchor.BottomLeft,
|
||||
Anchor = Anchor.BottomLeft,
|
||||
TextSize = 14,
|
||||
|
140
osu.Game/Graphics/UserInterface/OsuTabControlCheckBox.cs
Normal file
140
osu.Game/Graphics/UserInterface/OsuTabControlCheckBox.cs
Normal file
@ -0,0 +1,140 @@
|
||||
// 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;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Primitives;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Transforms;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Framework.Input;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
|
||||
namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
/// <summary>
|
||||
/// A checkbox styled to be placed in line with an <see cref="OsuTabControl{T}"/>
|
||||
/// </summary>
|
||||
public class OsuTabControlCheckBox : CheckBox
|
||||
{
|
||||
private readonly Box box;
|
||||
private readonly SpriteText text;
|
||||
private readonly TextAwesome icon;
|
||||
|
||||
public event EventHandler<CheckBoxState> Action;
|
||||
|
||||
private Color4? accentColour;
|
||||
public Color4 AccentColour
|
||||
{
|
||||
get { return accentColour.GetValueOrDefault(); }
|
||||
set
|
||||
{
|
||||
accentColour = value;
|
||||
|
||||
if (State != CheckBoxState.Checked)
|
||||
{
|
||||
text.Colour = AccentColour;
|
||||
icon.Colour = AccentColour;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string Text
|
||||
{
|
||||
get { return text.Text; }
|
||||
set { text.Text = value; }
|
||||
}
|
||||
|
||||
protected override void OnChecked()
|
||||
{
|
||||
fadeIn();
|
||||
icon.Icon = FontAwesome.fa_check_circle_o;
|
||||
Action?.Invoke(this, State);
|
||||
}
|
||||
|
||||
protected override void OnUnchecked()
|
||||
{
|
||||
fadeOut();
|
||||
icon.Icon = FontAwesome.fa_circle_o;
|
||||
Action?.Invoke(this, State);
|
||||
}
|
||||
|
||||
private const float transition_length = 500;
|
||||
|
||||
private void fadeIn()
|
||||
{
|
||||
box.FadeIn(transition_length, EasingTypes.OutQuint);
|
||||
text.FadeColour(Color4.White, transition_length, EasingTypes.OutQuint);
|
||||
}
|
||||
|
||||
private void fadeOut()
|
||||
{
|
||||
box.FadeOut(transition_length, EasingTypes.OutQuint);
|
||||
text.FadeColour(AccentColour, transition_length, EasingTypes.OutQuint);
|
||||
}
|
||||
|
||||
protected override bool OnHover(InputState state)
|
||||
{
|
||||
fadeIn();
|
||||
return base.OnHover(state);
|
||||
}
|
||||
|
||||
protected override void OnHoverLost(InputState state)
|
||||
{
|
||||
if (State == CheckBoxState.Unchecked)
|
||||
fadeOut();
|
||||
|
||||
base.OnHoverLost(state);
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
if (accentColour == null)
|
||||
AccentColour = colours.Blue;
|
||||
}
|
||||
|
||||
public OsuTabControlCheckBox()
|
||||
{
|
||||
AutoSizeAxes = Axes.Both;
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new FillFlowContainer
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Margin = new MarginPadding { Top = 5, Bottom = 5, },
|
||||
Spacing = new Vector2(5f, 0f),
|
||||
Direction = FillDirection.Horizontal,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
text = new OsuSpriteText
|
||||
{
|
||||
TextSize = 14,
|
||||
Font = @"Exo2.0-Bold",
|
||||
},
|
||||
icon = new TextAwesome
|
||||
{
|
||||
TextSize = 14,
|
||||
Icon = FontAwesome.fa_circle_o,
|
||||
Shadow = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
box = new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Height = 1,
|
||||
Alpha = 0,
|
||||
Colour = Color4.White,
|
||||
Origin = Anchor.BottomLeft,
|
||||
Anchor = Anchor.BottomLeft,
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
94
osu.Game/Modes/Judgements/DrawableJudgement.cs
Normal file
94
osu.Game/Modes/Judgements/DrawableJudgement.cs
Normal file
@ -0,0 +1,94 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using OpenTK;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Transforms;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Modes.Objects.Drawables;
|
||||
|
||||
namespace osu.Game.Modes.Judgements
|
||||
{
|
||||
/// <summary>
|
||||
/// A drawable object which visualises the hit result of a <see cref="Judgements.Judgement"/>.
|
||||
/// </summary>
|
||||
/// <typeparam name="TJudgement">The type of judgement to visualise.</typeparam>
|
||||
public class DrawableJudgement<TJudgement> : Container
|
||||
where TJudgement : Judgement
|
||||
{
|
||||
protected readonly TJudgement Judgement;
|
||||
|
||||
protected readonly SpriteText JudgementText;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a drawable which visualises a <see cref="Judgements.Judgement"/>.
|
||||
/// </summary>
|
||||
/// <param name="judgement">The judgement to visualise.</param>
|
||||
public DrawableJudgement(TJudgement judgement)
|
||||
{
|
||||
Judgement = judgement;
|
||||
|
||||
AutoSizeAxes = Axes.Both;
|
||||
|
||||
string resultString = judgement.Result == HitResult.Hit ? judgement.ResultString : judgement.Result.GetDescription();
|
||||
|
||||
Children = new[]
|
||||
{
|
||||
JudgementText = new OsuSpriteText
|
||||
{
|
||||
Origin = Anchor.Centre,
|
||||
Anchor = Anchor.Centre,
|
||||
Text = resultString.ToUpper(),
|
||||
Font = @"Venera",
|
||||
TextSize = 16
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
switch (Judgement.Result)
|
||||
{
|
||||
case HitResult.Miss:
|
||||
Colour = colours.Red;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
FadeInFromZero(100, EasingTypes.OutQuint);
|
||||
|
||||
switch (Judgement.Result)
|
||||
{
|
||||
case HitResult.Miss:
|
||||
ScaleTo(1.6f);
|
||||
ScaleTo(1, 100, EasingTypes.In);
|
||||
|
||||
MoveToOffset(new Vector2(0, 100), 800, EasingTypes.InQuint);
|
||||
RotateTo(40, 800, EasingTypes.InQuint);
|
||||
|
||||
Delay(600);
|
||||
FadeOut(200);
|
||||
break;
|
||||
case HitResult.Hit:
|
||||
ScaleTo(0.9f);
|
||||
ScaleTo(1, 500, EasingTypes.OutElastic);
|
||||
|
||||
Delay(100);
|
||||
FadeOut(400);
|
||||
break;
|
||||
}
|
||||
|
||||
Expire();
|
||||
}
|
||||
}
|
||||
}
|
35
osu.Game/Modes/Judgements/Judgement.cs
Normal file
35
osu.Game/Modes/Judgements/Judgement.cs
Normal file
@ -0,0 +1,35 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Game.Modes.Objects.Drawables;
|
||||
|
||||
namespace osu.Game.Modes.Judgements
|
||||
{
|
||||
public abstract class Judgement
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether this judgement is the result of a hit or a miss.
|
||||
/// </summary>
|
||||
public HitResult? Result;
|
||||
|
||||
/// <summary>
|
||||
/// The offset at which this judgement occurred.
|
||||
/// </summary>
|
||||
public double TimeOffset;
|
||||
|
||||
/// <summary>
|
||||
/// The combo after this judgement was processed.
|
||||
/// </summary>
|
||||
public ulong? ComboAtHit;
|
||||
|
||||
/// <summary>
|
||||
/// The string representation for the result achieved.
|
||||
/// </summary>
|
||||
public abstract string ResultString { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The string representation for the max result achievable.
|
||||
/// </summary>
|
||||
public abstract string MaxResultString { get; }
|
||||
}
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Game.Modes.Objects.Drawables;
|
||||
|
||||
namespace osu.Game.Modes.Judgements
|
||||
{
|
||||
public class JudgementInfo
|
||||
{
|
||||
public ulong? ComboAtHit;
|
||||
public HitResult? Result;
|
||||
public double TimeOffset;
|
||||
}
|
||||
}
|
@ -6,6 +6,7 @@ using osu.Game.Graphics;
|
||||
using osu.Game.Modes.Objects;
|
||||
using osu.Game.Modes.UI;
|
||||
using System;
|
||||
using osu.Game.Modes.Scoring;
|
||||
|
||||
namespace osu.Game.Modes.Mods
|
||||
{
|
||||
|
@ -11,11 +11,12 @@ using osu.Game.Beatmaps.Samples;
|
||||
using osu.Game.Modes.Judgements;
|
||||
using Container = osu.Framework.Graphics.Containers.Container;
|
||||
using osu.Game.Modes.Objects.Types;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.Modes.Objects.Drawables
|
||||
{
|
||||
public abstract class DrawableHitObject<TJudgement> : Container, IStateful<ArmedState>
|
||||
where TJudgement : JudgementInfo
|
||||
where TJudgement : Judgement
|
||||
{
|
||||
public override bool HandleInput => Interactive;
|
||||
|
||||
@ -23,7 +24,7 @@ namespace osu.Game.Modes.Objects.Drawables
|
||||
|
||||
public TJudgement Judgement;
|
||||
|
||||
protected abstract TJudgement CreateJudgementInfo();
|
||||
protected abstract TJudgement CreateJudgement();
|
||||
|
||||
protected abstract void UpdateState(ArmedState state);
|
||||
|
||||
@ -61,7 +62,7 @@ namespace osu.Game.Modes.Objects.Drawables
|
||||
|
||||
//we may be setting a custom judgement in test cases or what not.
|
||||
if (Judgement == null)
|
||||
Judgement = CreateJudgementInfo();
|
||||
Judgement = CreateJudgement();
|
||||
|
||||
//force application of the state that was set before we loaded.
|
||||
UpdateState(State);
|
||||
@ -70,12 +71,17 @@ namespace osu.Game.Modes.Objects.Drawables
|
||||
|
||||
public abstract class DrawableHitObject<TObject, TJudgement> : DrawableHitObject<TJudgement>
|
||||
where TObject : HitObject
|
||||
where TJudgement : JudgementInfo
|
||||
where TJudgement : Judgement
|
||||
{
|
||||
public event Action<DrawableHitObject<TObject, TJudgement>> OnJudgement;
|
||||
|
||||
public TObject HitObject;
|
||||
|
||||
/// <summary>
|
||||
/// The colour used for various elements of this DrawableHitObject.
|
||||
/// </summary>
|
||||
public Color4 AccentColour { get; protected set; }
|
||||
|
||||
protected DrawableHitObject(TObject hitObject)
|
||||
{
|
||||
HitObject = hitObject;
|
||||
|
@ -9,6 +9,7 @@ using osu.Game.Screens.Play;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using osu.Game.Modes.Scoring;
|
||||
|
||||
namespace osu.Game.Modes
|
||||
{
|
||||
|
@ -3,11 +3,11 @@
|
||||
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using osu.Game.Users;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Modes.Mods;
|
||||
using osu.Game.Users;
|
||||
|
||||
namespace osu.Game.Modes
|
||||
namespace osu.Game.Modes.Scoring
|
||||
{
|
||||
public class Score
|
||||
{
|
@ -1,15 +1,15 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using osu.Game.Modes.Judgements;
|
||||
using osu.Game.Modes.UI;
|
||||
using osu.Game.Modes.Objects;
|
||||
using osu.Framework.Configuration;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Modes.Judgements;
|
||||
using osu.Game.Modes.Objects;
|
||||
using osu.Game.Modes.UI;
|
||||
|
||||
namespace osu.Game.Modes
|
||||
namespace osu.Game.Modes.Scoring
|
||||
{
|
||||
public abstract class ScoreProcessor
|
||||
{
|
||||
@ -105,7 +105,7 @@ namespace osu.Game.Modes
|
||||
|
||||
public abstract class ScoreProcessor<TObject, TJudgement> : ScoreProcessor
|
||||
where TObject : HitObject
|
||||
where TJudgement : JudgementInfo
|
||||
where TJudgement : Judgement
|
||||
{
|
||||
/// <summary>
|
||||
/// All judgements held by this ScoreProcessor.
|
||||
@ -122,7 +122,7 @@ namespace osu.Game.Modes
|
||||
{
|
||||
Judgements.Capacity = hitRenderer.Beatmap.HitObjects.Count;
|
||||
|
||||
hitRenderer.OnJudgement += addJudgement;
|
||||
hitRenderer.OnJudgement += AddJudgement;
|
||||
|
||||
ComputeTargets(hitRenderer.Beatmap);
|
||||
|
||||
@ -139,11 +139,11 @@ namespace osu.Game.Modes
|
||||
/// Adds a judgement to this ScoreProcessor.
|
||||
/// </summary>
|
||||
/// <param name="judgement">The judgement to add.</param>
|
||||
private void addJudgement(TJudgement judgement)
|
||||
protected void AddJudgement(TJudgement judgement)
|
||||
{
|
||||
Judgements.Add(judgement);
|
||||
|
||||
UpdateCalculations(judgement);
|
||||
OnNewJugement(judgement);
|
||||
|
||||
judgement.ComboAtHit = (ulong)Combo.Value;
|
||||
|
||||
@ -158,7 +158,7 @@ namespace osu.Game.Modes
|
||||
/// <summary>
|
||||
/// Update any values that potentially need post-processing on a judgement change.
|
||||
/// </summary>
|
||||
/// <param name="newJudgement">A new JudgementInfo that triggered this calculation. May be null.</param>
|
||||
protected abstract void UpdateCalculations(TJudgement newJudgement);
|
||||
/// <param name="judgement">The judgement that triggered this calculation.</param>
|
||||
protected abstract void OnNewJugement(TJudgement judgement);
|
||||
}
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace osu.Game.Modes
|
||||
namespace osu.Game.Modes.Scoring
|
||||
{
|
||||
public enum ScoreRank
|
||||
{
|
@ -14,6 +14,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using osu.Game.Modes.Scoring;
|
||||
|
||||
namespace osu.Game.Modes.UI
|
||||
{
|
||||
@ -143,7 +144,7 @@ namespace osu.Game.Modes.UI
|
||||
/// <typeparam name="TJudgement">The type of Judgement of DrawableHitObjects contained by this HitRenderer.</typeparam>
|
||||
public abstract class HitRenderer<TObject, TJudgement> : HitRenderer<TObject>
|
||||
where TObject : HitObject
|
||||
where TJudgement : JudgementInfo
|
||||
where TJudgement : Judgement
|
||||
{
|
||||
public event Action<TJudgement> OnJudgement;
|
||||
|
||||
|
@ -9,6 +9,7 @@ using osu.Game.Configuration;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Screens.Play;
|
||||
using System;
|
||||
using osu.Game.Modes.Scoring;
|
||||
|
||||
namespace osu.Game.Modes.UI
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ namespace osu.Game.Modes.UI
|
||||
{
|
||||
public abstract class Playfield<TObject, TJudgement> : Container
|
||||
where TObject : HitObject
|
||||
where TJudgement : JudgementInfo
|
||||
where TJudgement : Judgement
|
||||
{
|
||||
/// <summary>
|
||||
/// The HitObjects contained in this Playfield.
|
||||
|
@ -5,7 +5,7 @@ using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
using osu.Framework.IO.Network;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Modes;
|
||||
using osu.Game.Modes.Scoring;
|
||||
|
||||
namespace osu.Game.Online.API.Requests
|
||||
{
|
||||
|
@ -26,6 +26,7 @@ using osu.Framework.Graphics.Primitives;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Framework.Threading;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Modes.Scoring;
|
||||
using osu.Game.Overlays.Notifications;
|
||||
using osu.Game.Screens.Play;
|
||||
|
||||
|
@ -23,6 +23,7 @@ using osu.Game.Screens.Backgrounds;
|
||||
using osu.Game.Screens.Ranking;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using osu.Game.Modes.Scoring;
|
||||
|
||||
namespace osu.Game.Screens.Play
|
||||
{
|
||||
|
@ -6,7 +6,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Transforms;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Modes;
|
||||
using osu.Game.Modes.Scoring;
|
||||
using osu.Game.Screens.Backgrounds;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
|
111
osu.Game/Screens/Select/BeatmapDetailArea.cs
Normal file
111
osu.Game/Screens/Select/BeatmapDetailArea.cs
Normal file
@ -0,0 +1,111 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Primitives;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Online.API;
|
||||
using osu.Game.Online.API.Requests;
|
||||
using osu.Game.Screens.Select.Leaderboards;
|
||||
|
||||
namespace osu.Game.Screens.Select
|
||||
{
|
||||
public class BeatmapDetailArea : Container
|
||||
{
|
||||
private readonly Container content;
|
||||
protected override Container<Drawable> Content => content;
|
||||
|
||||
public readonly Container Details; //todo: replace with a real details view when added
|
||||
public readonly Leaderboard Leaderboard;
|
||||
|
||||
private APIAccess api;
|
||||
|
||||
private WorkingBeatmap beatmap;
|
||||
public WorkingBeatmap Beatmap
|
||||
{
|
||||
get
|
||||
{
|
||||
return beatmap;
|
||||
}
|
||||
set
|
||||
{
|
||||
beatmap = value;
|
||||
if (IsLoaded) Schedule(updateScores);
|
||||
}
|
||||
}
|
||||
|
||||
public BeatmapDetailArea()
|
||||
{
|
||||
AddInternal(new Drawable[]
|
||||
{
|
||||
new BeatmapDetailAreaTabControl
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
OnFilter = (tab, mods) =>
|
||||
{
|
||||
switch (tab)
|
||||
{
|
||||
case BeatmapDetailTab.Details:
|
||||
Details.Show();
|
||||
Leaderboard.Hide();
|
||||
break;
|
||||
default:
|
||||
Details.Hide();
|
||||
Leaderboard.Show();
|
||||
break;
|
||||
}
|
||||
|
||||
//for now let's always update scores.
|
||||
updateScores();
|
||||
},
|
||||
},
|
||||
content = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Padding = new MarginPadding { Top = BeatmapDetailAreaTabControl.HEIGHT },
|
||||
},
|
||||
});
|
||||
|
||||
Add(new Drawable[]
|
||||
{
|
||||
Details = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
},
|
||||
Leaderboard = new Leaderboard
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
updateScores();
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader(permitNulls: true)]
|
||||
private void load(APIAccess api)
|
||||
{
|
||||
this.api = api;
|
||||
}
|
||||
|
||||
private GetScoresRequest getScoresRequest;
|
||||
private void updateScores()
|
||||
{
|
||||
if (!IsLoaded) return;
|
||||
|
||||
Leaderboard.Scores = null;
|
||||
getScoresRequest?.Cancel();
|
||||
|
||||
if (api == null || beatmap?.BeatmapInfo == null || !Leaderboard.IsPresent) return;
|
||||
|
||||
getScoresRequest = new GetScoresRequest(beatmap.BeatmapInfo);
|
||||
getScoresRequest.Success += r => Leaderboard.Scores = r.Scores;
|
||||
api.Queue(getScoresRequest);
|
||||
}
|
||||
}
|
||||
}
|
79
osu.Game/Screens/Select/BeatmapDetailAreaTabControl.cs
Normal file
79
osu.Game/Screens/Select/BeatmapDetailAreaTabControl.cs
Normal file
@ -0,0 +1,79 @@
|
||||
// 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;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
|
||||
namespace osu.Game.Screens.Select
|
||||
{
|
||||
public class BeatmapDetailAreaTabControl : Container
|
||||
{
|
||||
public static readonly float HEIGHT = 24;
|
||||
private readonly OsuTabControlCheckBox modsCheckbox;
|
||||
private readonly OsuTabControl<BeatmapDetailTab> tabs;
|
||||
|
||||
public Action<BeatmapDetailTab, bool> OnFilter; //passed the selected tab and if mods is checked
|
||||
|
||||
private void invokeOnFilter()
|
||||
{
|
||||
OnFilter?.Invoke(tabs.SelectedItem, modsCheckbox.State == CheckBoxState.Checked);
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colour)
|
||||
{
|
||||
modsCheckbox.AccentColour = tabs.AccentColour = colour.YellowLight;
|
||||
}
|
||||
|
||||
public BeatmapDetailAreaTabControl()
|
||||
{
|
||||
Height = HEIGHT;
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Box
|
||||
{
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Height = 1,
|
||||
Colour = Color4.White.Opacity(0.2f),
|
||||
},
|
||||
tabs = new OsuTabControl<BeatmapDetailTab>
|
||||
{
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
},
|
||||
modsCheckbox = new OsuTabControlCheckBox
|
||||
{
|
||||
Anchor = Anchor.BottomRight,
|
||||
Origin = Anchor.BottomRight,
|
||||
Text = @"Mods",
|
||||
},
|
||||
};
|
||||
|
||||
tabs.ItemChanged += (sender, e) => invokeOnFilter();
|
||||
modsCheckbox.Action += (sender, e) => invokeOnFilter();
|
||||
|
||||
tabs.SelectedItem = BeatmapDetailTab.Global;
|
||||
}
|
||||
}
|
||||
|
||||
public enum BeatmapDetailTab
|
||||
{
|
||||
Details,
|
||||
Local,
|
||||
Country,
|
||||
Global,
|
||||
Friends
|
||||
}
|
||||
}
|
@ -22,6 +22,8 @@ namespace osu.Game.Screens.Select
|
||||
private const float play_song_select_button_width = 100;
|
||||
private const float play_song_select_button_height = 50;
|
||||
|
||||
public const float HEIGHT = 50;
|
||||
|
||||
public const int TRANSITION_LENGTH = 300;
|
||||
|
||||
private const float padding = 80;
|
||||
@ -69,10 +71,8 @@ namespace osu.Game.Screens.Select
|
||||
{
|
||||
AlwaysReceiveInput = true;
|
||||
|
||||
const float bottom_tool_height = 50;
|
||||
|
||||
RelativeSizeAxes = Axes.X;
|
||||
Height = bottom_tool_height;
|
||||
Height = HEIGHT;
|
||||
Anchor = Anchor.BottomCentre;
|
||||
Origin = Anchor.BottomCentre;
|
||||
Children = new Drawable[]
|
||||
|
@ -6,8 +6,8 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
using osu.Game.Modes;
|
||||
using osu.Framework.Extensions;
|
||||
using osu.Game.Modes.Scoring;
|
||||
|
||||
namespace osu.Game.Screens.Select.Leaderboards
|
||||
{
|
||||
|
@ -9,8 +9,8 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Colour;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Primitives;
|
||||
using osu.Game.Modes;
|
||||
using System;
|
||||
using osu.Game.Modes.Scoring;
|
||||
|
||||
namespace osu.Game.Screens.Select.Leaderboards
|
||||
{
|
||||
@ -74,7 +74,7 @@ namespace osu.Game.Screens.Select.Leaderboards
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Spacing = new Vector2(0f, 5f),
|
||||
Padding = new MarginPadding(5),
|
||||
Padding = new MarginPadding { Top = 10, Bottom = 5 },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -10,11 +10,11 @@ using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Transforms;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Modes;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Game.Modes.Mods;
|
||||
using osu.Game.Users;
|
||||
using osu.Framework;
|
||||
using osu.Game.Modes.Scoring;
|
||||
|
||||
namespace osu.Game.Screens.Select.Leaderboards
|
||||
{
|
||||
|
@ -4,15 +4,14 @@
|
||||
using OpenTK.Input;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Primitives;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Online.API.Requests;
|
||||
using osu.Game.Overlays.Mods;
|
||||
using osu.Game.Screens.Edit;
|
||||
using osu.Game.Screens.Play;
|
||||
using osu.Game.Screens.Select.Leaderboards;
|
||||
|
||||
namespace osu.Game.Screens.Select
|
||||
{
|
||||
@ -20,21 +19,21 @@ namespace osu.Game.Screens.Select
|
||||
{
|
||||
private OsuScreen player;
|
||||
private readonly ModSelectOverlay modSelect;
|
||||
private readonly Leaderboard leaderboard;
|
||||
private readonly BeatmapDetailArea beatmapDetails;
|
||||
|
||||
public PlaySongSelect()
|
||||
{
|
||||
Add(modSelect = new ModSelectOverlay
|
||||
FooterPanels.Add(modSelect = new ModSelectOverlay
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Origin = Anchor.BottomCentre,
|
||||
Anchor = Anchor.BottomCentre,
|
||||
Margin = new MarginPadding { Bottom = 50 }
|
||||
});
|
||||
|
||||
LeftContent.Add(leaderboard = new Leaderboard
|
||||
LeftContent.Add(beatmapDetails = new BeatmapDetailArea
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Padding = new MarginPadding { Top = 10, Right = 5 },
|
||||
});
|
||||
}
|
||||
|
||||
@ -52,35 +51,32 @@ namespace osu.Game.Screens.Select
|
||||
}, Key.Number3);
|
||||
}
|
||||
|
||||
private GetScoresRequest getScoresRequest;
|
||||
|
||||
protected override void OnBeatmapChanged(WorkingBeatmap beatmap)
|
||||
{
|
||||
beatmap?.Mods.BindTo(modSelect.SelectedMods);
|
||||
|
||||
updateLeaderboard(beatmap);
|
||||
beatmapDetails.Beatmap = beatmap;
|
||||
|
||||
base.OnBeatmapChanged(beatmap);
|
||||
}
|
||||
|
||||
private void updateLeaderboard(WorkingBeatmap beatmap)
|
||||
{
|
||||
leaderboard.Scores = null;
|
||||
getScoresRequest?.Cancel();
|
||||
|
||||
if (beatmap?.BeatmapInfo == null) return;
|
||||
|
||||
getScoresRequest = new GetScoresRequest(beatmap.BeatmapInfo);
|
||||
getScoresRequest.Success += r => leaderboard.Scores = r.Scores;
|
||||
Game.API.Queue(getScoresRequest);
|
||||
}
|
||||
|
||||
protected override void OnResuming(Screen last)
|
||||
{
|
||||
player = null;
|
||||
base.OnResuming(last);
|
||||
}
|
||||
|
||||
protected override bool OnExiting(Screen next)
|
||||
{
|
||||
if (modSelect.State == Visibility.Visible)
|
||||
{
|
||||
modSelect.Hide();
|
||||
return true;
|
||||
}
|
||||
|
||||
return base.OnExiting(next);
|
||||
}
|
||||
|
||||
protected override void OnSelected()
|
||||
{
|
||||
if (player != null) return;
|
||||
|
@ -65,6 +65,12 @@ namespace osu.Game.Screens.Select
|
||||
/// </summary>
|
||||
protected readonly Footer Footer;
|
||||
|
||||
/// <summary>
|
||||
/// Contains any panel which is triggered by a footer button.
|
||||
/// Helps keep them located beneath the footer itself.
|
||||
/// </summary>
|
||||
protected readonly Container FooterPanels;
|
||||
|
||||
public readonly FilterControl FilterControl;
|
||||
|
||||
protected SongSelect()
|
||||
@ -131,11 +137,15 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
if (ShowFooter)
|
||||
{
|
||||
Add(BeatmapOptions = new BeatmapOptionsOverlay
|
||||
Add(FooterPanels = new Container
|
||||
{
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Margin = new MarginPadding
|
||||
{
|
||||
Bottom = 50,
|
||||
Bottom = Footer.HEIGHT,
|
||||
},
|
||||
});
|
||||
Add(Footer = new Footer
|
||||
@ -143,6 +153,8 @@ namespace osu.Game.Screens.Select
|
||||
OnBack = Exit,
|
||||
OnStart = raiseSelect,
|
||||
});
|
||||
|
||||
FooterPanels.Add(BeatmapOptions = new BeatmapOptionsOverlay());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -96,6 +96,7 @@
|
||||
<Compile Include="IO\Legacy\SerializationReader.cs" />
|
||||
<Compile Include="IO\Legacy\SerializationWriter.cs" />
|
||||
<Compile Include="IPC\ScoreIPCChannel.cs" />
|
||||
<Compile Include="Modes\Judgements\DrawableJudgement.cs" />
|
||||
<Compile Include="Modes\LegacyReplay.cs" />
|
||||
<Compile Include="Modes\Mods\IApplicableMod.cs" />
|
||||
<Compile Include="Modes\Mods\ModType.cs" />
|
||||
@ -112,7 +113,7 @@
|
||||
<Compile Include="Modes\Objects\SliderCurve.cs" />
|
||||
<Compile Include="Modes\Objects\Types\CurveType.cs" />
|
||||
<Compile Include="Modes\Objects\Drawables\IDrawableHitObjectWithProxiedApproach.cs" />
|
||||
<Compile Include="Modes\Judgements\JudgementInfo.cs" />
|
||||
<Compile Include="Modes\Judgements\Judgement.cs" />
|
||||
<Compile Include="Modes\Objects\HitObjectParser.cs" />
|
||||
<Compile Include="Modes\Objects\Types\IHasCombo.cs" />
|
||||
<Compile Include="Modes\Objects\Types\IHasEndTime.cs" />
|
||||
@ -123,8 +124,8 @@
|
||||
<Compile Include="Modes\Objects\Types\IHasHold.cs" />
|
||||
<Compile Include="Modes\Objects\Legacy\LegacyHitObjectType.cs" />
|
||||
<Compile Include="Modes\Replay.cs" />
|
||||
<Compile Include="Modes\Score.cs" />
|
||||
<Compile Include="Modes\ScoreProcessor.cs" />
|
||||
<Compile Include="Modes\Scoring\Score.cs" />
|
||||
<Compile Include="Modes\Scoring\ScoreProcessor.cs" />
|
||||
<Compile Include="Modes\UI\HealthDisplay.cs" />
|
||||
<Compile Include="Modes\UI\HudOverlay.cs" />
|
||||
<Compile Include="Modes\UI\StandardHealthDisplay.cs" />
|
||||
@ -358,10 +359,13 @@
|
||||
<Compile Include="Screens\Select\Leaderboards\LeaderboardScore.cs" />
|
||||
<Compile Include="Users\Country.cs" />
|
||||
<Compile Include="Users\Team.cs" />
|
||||
<Compile Include="Modes\ScoreRank.cs" />
|
||||
<Compile Include="Modes\Scoring\ScoreRank.cs" />
|
||||
<Compile Include="Users\Avatar.cs" />
|
||||
<Compile Include="Screens\Select\Leaderboards\DrawableRank.cs" />
|
||||
<Compile Include="Graphics\UserInterface\OsuTabControl.cs" />
|
||||
<Compile Include="Screens\Select\BeatmapDetailArea.cs" />
|
||||
<Compile Include="Graphics\UserInterface\OsuTabControlCheckBox.cs" />
|
||||
<Compile Include="Screens\Select\BeatmapDetailAreaTabControl.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="$(SolutionDir)\osu-framework\osu.Framework\osu.Framework.csproj">
|
||||
|
@ -1,4 +1,9 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:Boolean x:Key="/Default/CodeInspection/ExcludedFiles/FileMasksToSkip/=_002A_002Efnt/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/ExcludedFiles/FileMasksToSkip/=_002A_002Emp3/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/ExcludedFiles/FileMasksToSkip/=_002A_002Epng/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/ExcludedFiles/FileMasksToSkip/=_002A_002Ewav/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=D9A367C9_002D4C1A_002D489F_002D9B05_002DA0CEA2B53B58/@EntryIndexedValue">ExplicitlyExcluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/AnalysisEnabled/@EntryValue">SOLUTION</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ArrangeModifiersOrder/@EntryIndexedValue">WARNING</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ArrangeRedundantParentheses/@EntryIndexedValue">WARNING</s:String>
|
||||
|
Loading…
Reference in New Issue
Block a user