mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:57:39 +08:00
Merge branch 'master' into move-easingtypes
This commit is contained in:
commit
bca18ce209
@ -1 +1 @@
|
||||
Subproject commit 2d8a6c1699ff1acd3915fc28e8906dabf1b145a3
|
||||
Subproject commit e67453159540f5008b5efadfbc12dfb3f4bee1f7
|
@ -38,7 +38,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
Position = new Vector2(100, 100)
|
||||
});
|
||||
|
||||
Add(new CentreHitCircle(new AccentedCirclePiece()
|
||||
Add(new CentreHitCircle(new StrongCirclePiece()
|
||||
{
|
||||
KiaiMode = kiai
|
||||
})
|
||||
@ -54,7 +54,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
Position = new Vector2(100, 300)
|
||||
});
|
||||
|
||||
Add(new RimHitCircle(new AccentedCirclePiece()
|
||||
Add(new RimHitCircle(new StrongCirclePiece()
|
||||
{
|
||||
KiaiMode = kiai
|
||||
})
|
||||
@ -70,7 +70,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
Position = new Vector2(100, 500)
|
||||
});
|
||||
|
||||
Add(new SwellCircle(new AccentedCirclePiece()
|
||||
Add(new SwellCircle(new StrongCirclePiece()
|
||||
{
|
||||
KiaiMode = kiai
|
||||
})
|
||||
@ -87,7 +87,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
Position = new Vector2(575, 100)
|
||||
});
|
||||
|
||||
Add(new DrumRollCircle(new AccentedCirclePiece()
|
||||
Add(new DrumRollCircle(new StrongCirclePiece()
|
||||
{
|
||||
KiaiMode = kiai
|
||||
})
|
||||
|
@ -44,7 +44,7 @@ namespace osu.Game.Modes.Taiko.Beatmaps
|
||||
IHasRepeats repeatsData = original as IHasRepeats;
|
||||
IHasEndTime endTimeData = original as IHasEndTime;
|
||||
|
||||
bool accented = ((original.Sample?.Type ?? SampleType.None) & SampleType.Finish) > 0;
|
||||
bool strong = ((original.Sample?.Type ?? SampleType.None) & SampleType.Finish) > 0;
|
||||
|
||||
if (distanceData != null)
|
||||
{
|
||||
@ -52,7 +52,7 @@ namespace osu.Game.Modes.Taiko.Beatmaps
|
||||
{
|
||||
StartTime = original.StartTime,
|
||||
Sample = original.Sample,
|
||||
Accented = accented,
|
||||
IsStrong = strong,
|
||||
|
||||
Distance = distanceData.Distance * (repeatsData?.RepeatCount ?? 1)
|
||||
};
|
||||
@ -65,7 +65,7 @@ namespace osu.Game.Modes.Taiko.Beatmaps
|
||||
{
|
||||
StartTime = original.StartTime,
|
||||
Sample = original.Sample,
|
||||
Accented = accented,
|
||||
IsStrong = strong,
|
||||
|
||||
EndTime = original.StartTime + endTimeData.Duration * bash_convert_factor
|
||||
};
|
||||
@ -75,7 +75,7 @@ namespace osu.Game.Modes.Taiko.Beatmaps
|
||||
{
|
||||
StartTime = original.StartTime,
|
||||
Sample = original.Sample,
|
||||
Accented = accented
|
||||
IsStrong = strong
|
||||
};
|
||||
}
|
||||
}
|
||||
|
57
osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs
Normal file
57
osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.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.Objects.Drawables;
|
||||
using osu.Game.Modes.Taiko.Judgements;
|
||||
using System.Linq;
|
||||
|
||||
namespace osu.Game.Modes.Taiko.Objects.Drawable
|
||||
{
|
||||
public class DrawableDrumRoll : DrawableTaikoHitObject
|
||||
{
|
||||
private readonly DrumRoll drumRoll;
|
||||
|
||||
public DrawableDrumRoll(DrumRoll drumRoll)
|
||||
: base(drumRoll)
|
||||
{
|
||||
this.drumRoll = drumRoll;
|
||||
|
||||
int tickIndex = 0;
|
||||
foreach (var tick in drumRoll.Ticks)
|
||||
{
|
||||
var newTick = new DrawableDrumRollTick(tick)
|
||||
{
|
||||
Depth = tickIndex,
|
||||
X = (float)((tick.StartTime - HitObject.StartTime) / drumRoll.Duration)
|
||||
};
|
||||
|
||||
AddNested(newTick);
|
||||
|
||||
tickIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void UpdateState(ArmedState state)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void CheckJudgement(bool userTriggered)
|
||||
{
|
||||
if (userTriggered)
|
||||
return;
|
||||
|
||||
if (Judgement.TimeOffset < 0)
|
||||
return;
|
||||
|
||||
int countHit = NestedHitObjects.Count(o => o.Judgement.Result == HitResult.Hit);
|
||||
|
||||
if (countHit > drumRoll.RequiredGoodHits)
|
||||
{
|
||||
Judgement.Result = HitResult.Hit;
|
||||
Judgement.TaikoResult = countHit >= drumRoll.RequiredGreatHits ? TaikoHitResult.Great : TaikoHitResult.Good;
|
||||
}
|
||||
else
|
||||
Judgement.Result = HitResult.Miss;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
// 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.Input;
|
||||
using osu.Game.Modes.Taiko.Judgements;
|
||||
using System;
|
||||
using osu.Game.Modes.Objects.Drawables;
|
||||
|
||||
namespace osu.Game.Modes.Taiko.Objects.Drawable
|
||||
{
|
||||
public class DrawableDrumRollTick : DrawableTaikoHitObject
|
||||
{
|
||||
private readonly DrumRollTick tick;
|
||||
|
||||
public DrawableDrumRollTick(DrumRollTick tick)
|
||||
: base(tick)
|
||||
{
|
||||
this.tick = tick;
|
||||
}
|
||||
|
||||
protected override TaikoJudgement CreateJudgement() => new TaikoDrumRollTickJudgement();
|
||||
|
||||
protected override void CheckJudgement(bool userTriggered)
|
||||
{
|
||||
if (!userTriggered)
|
||||
{
|
||||
if (Judgement.TimeOffset > tick.HitWindow)
|
||||
Judgement.Result = HitResult.Miss;
|
||||
return;
|
||||
}
|
||||
|
||||
if (Math.Abs(Judgement.TimeOffset) < tick.HitWindow)
|
||||
{
|
||||
Judgement.Result = HitResult.Hit;
|
||||
Judgement.TaikoResult = TaikoHitResult.Great;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void UpdateState(ArmedState state)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void UpdateScrollPosition(double time)
|
||||
{
|
||||
// Drum roll ticks shouldn't move
|
||||
}
|
||||
|
||||
protected override bool HandleKeyPress(Key key)
|
||||
{
|
||||
return !Judgement.Result.HasValue && UpdateJudgement(true);
|
||||
}
|
||||
}
|
||||
}
|
@ -8,7 +8,7 @@ using osu.Framework.Input;
|
||||
|
||||
namespace osu.Game.Modes.Taiko.Objects.Drawable
|
||||
{
|
||||
public abstract class DrawableAccentedHit : DrawableHit
|
||||
public abstract class DrawableStrongHit : DrawableHit
|
||||
{
|
||||
/// <summary>
|
||||
/// The lenience for the second key press.
|
||||
@ -20,7 +20,7 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable
|
||||
private bool firstKeyHeld;
|
||||
private Key firstHitKey;
|
||||
|
||||
protected DrawableAccentedHit(Hit hit)
|
||||
protected DrawableStrongHit(Hit hit)
|
||||
: base(hit)
|
||||
{
|
||||
}
|
||||
@ -71,7 +71,7 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable
|
||||
if (!HitKeys.Contains(key))
|
||||
return false;
|
||||
|
||||
// Assume the intention was to hit the accented hit with both keys only if the first key is still being held down
|
||||
// Assume the intention was to hit the strong hit with both keys only if the first key is still being held down
|
||||
return firstKeyHeld && UpdateJudgement(true);
|
||||
}
|
||||
|
@ -20,6 +20,10 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable.Pieces
|
||||
/// </summary>
|
||||
public class CirclePiece : Container
|
||||
{
|
||||
public const float SYMBOL_SIZE = TaikoHitObject.CIRCLE_RADIUS * 2f * 0.45f;
|
||||
public const float SYMBOL_BORDER = 8;
|
||||
public const float SYMBOL_INNER_SIZE = SYMBOL_SIZE - 2 * SYMBOL_BORDER;
|
||||
|
||||
private Color4 accentColour;
|
||||
/// <summary>
|
||||
/// The colour of the inner circle and outer glows.
|
||||
|
@ -6,20 +6,20 @@ using OpenTK;
|
||||
namespace osu.Game.Modes.Taiko.Objects.Drawable.Pieces
|
||||
{
|
||||
/// <summary>
|
||||
/// A type of circle piece which is drawn at a higher scale as an "accent".
|
||||
/// A type of circle piece which is drawn at a higher scale to represent a "strong" piece.
|
||||
/// </summary>
|
||||
public class AccentedCirclePiece : CirclePiece
|
||||
public class StrongCirclePiece : CirclePiece
|
||||
{
|
||||
/// <summary>
|
||||
/// The amount to scale up the base circle to show it as an "accented" piece.
|
||||
/// The amount to scale up the base circle to show it as a "strong" piece.
|
||||
/// </summary>
|
||||
private const float accent_scale = 1.5f;
|
||||
private const float strong_scale = 1.5f;
|
||||
|
||||
public AccentedCirclePiece()
|
||||
public StrongCirclePiece()
|
||||
{
|
||||
SymbolContainer.Scale = new Vector2(accent_scale);
|
||||
SymbolContainer.Scale = new Vector2(strong_scale);
|
||||
}
|
||||
|
||||
public override Vector2 Size => new Vector2(base.Size.X, base.Size.Y * accent_scale);
|
||||
public override Vector2 Size => new Vector2(base.Size.X, base.Size.Y * strong_scale);
|
||||
}
|
||||
}
|
@ -101,4 +101,4 @@ namespace osu.Game.Modes.Taiko.Objects
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -15,5 +15,10 @@ namespace osu.Game.Modes.Taiko.Objects
|
||||
/// <para>Half of this value is the hit window of the tick.</para>
|
||||
/// </summary>
|
||||
public double TickTimeDistance;
|
||||
|
||||
/// <summary>
|
||||
/// The time allowed to hit this tick.
|
||||
/// </summary>
|
||||
public double HitWindow => TickTimeDistance / 2;
|
||||
}
|
||||
}
|
@ -20,10 +20,10 @@ namespace osu.Game.Modes.Taiko.Objects
|
||||
public double PreEmpt;
|
||||
|
||||
/// <summary>
|
||||
/// Whether this HitObject is accented.
|
||||
/// Accented hit objects give more points for hitting the hit object with both keys.
|
||||
/// Whether this HitObject is a "strong" type.
|
||||
/// Strong hit objects give more points for hitting the hit object with both keys.
|
||||
/// </summary>
|
||||
public bool Accented;
|
||||
public bool IsStrong;
|
||||
|
||||
/// <summary>
|
||||
/// Whether this HitObject is in Kiai time.
|
||||
|
@ -128,7 +128,7 @@ namespace osu.Game.Modes.Taiko.Scoring
|
||||
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);
|
||||
var accentedHits = beatmap.HitObjects.FindAll(o => o is Hit && o.IsStrong);
|
||||
|
||||
// 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
|
||||
@ -143,7 +143,7 @@ namespace osu.Game.Modes.Taiko.Scoring
|
||||
{
|
||||
Result = HitResult.Hit,
|
||||
TaikoResult = TaikoHitResult.Great,
|
||||
SecondHit = obj.Accented
|
||||
SecondHit = obj.IsStrong
|
||||
});
|
||||
}
|
||||
else if (obj is DrumRoll)
|
||||
@ -154,7 +154,7 @@ namespace osu.Game.Modes.Taiko.Scoring
|
||||
{
|
||||
Result = HitResult.Hit,
|
||||
TaikoResult = TaikoHitResult.Great,
|
||||
SecondHit = obj.Accented
|
||||
SecondHit = obj.IsStrong
|
||||
});
|
||||
}
|
||||
|
||||
@ -162,7 +162,7 @@ namespace osu.Game.Modes.Taiko.Scoring
|
||||
{
|
||||
Result = HitResult.Hit,
|
||||
TaikoResult = TaikoHitResult.Great,
|
||||
SecondHit = obj.Accented
|
||||
SecondHit = obj.IsStrong
|
||||
});
|
||||
}
|
||||
else if (obj is Swell)
|
||||
|
@ -26,6 +26,7 @@ namespace osu.Game.Modes.Taiko.UI
|
||||
|
||||
/// <summary>
|
||||
/// The play field height scale.
|
||||
/// This also uniformly scales the notes to match the new playfield height.
|
||||
/// </summary>
|
||||
public const float PLAYFIELD_SCALE = 0.65f;
|
||||
|
||||
@ -173,6 +174,7 @@ namespace osu.Game.Modes.Taiko.UI
|
||||
public override void Add(DrawableHitObject<TaikoHitObject, TaikoJudgement> h)
|
||||
{
|
||||
h.Depth = (float)h.HitObject.StartTime;
|
||||
h.Scale = new Vector2(PLAYFIELD_SCALE);
|
||||
|
||||
base.Add(h);
|
||||
}
|
||||
|
@ -53,17 +53,19 @@
|
||||
<Compile Include="Judgements\TaikoJudgement.cs" />
|
||||
<Compile Include="Judgements\TaikoHitResult.cs" />
|
||||
<Compile Include="Objects\Drawable\DrawableHit.cs" />
|
||||
<Compile Include="Objects\Drawable\DrawableAccentedHit.cs" />
|
||||
<Compile Include="Objects\Drawable\Pieces\AccentedCirclePiece.cs" />
|
||||
<Compile Include="Objects\Drawable\DrawableStrongHit.cs" />
|
||||
<Compile Include="Objects\Drawable\DrawableDrumRoll.cs" />
|
||||
<Compile Include="Objects\Drawable\DrawableDrumRollTick.cs" />
|
||||
<Compile Include="Objects\Drawable\DrawableSwell.cs" />
|
||||
<Compile Include="Objects\Drawable\DrawableTaikoHitObject.cs" />
|
||||
<Compile Include="Objects\Drawable\Pieces\StrongCirclePiece.cs" />
|
||||
<Compile Include="Objects\Drawable\Pieces\CirclePiece.cs" />
|
||||
<Compile Include="Objects\DrumRoll.cs" />
|
||||
<Compile Include="Objects\DrumRollTick.cs" />
|
||||
<Compile Include="Objects\Hit.cs" />
|
||||
<Compile Include="Objects\Swell.cs" />
|
||||
<Compile Include="Objects\Drawable\Pieces\CirclePiece.cs" />
|
||||
<Compile Include="TaikoDifficultyCalculator.cs" />
|
||||
<Compile Include="Objects\TaikoHitObject.cs" />
|
||||
<Compile Include="TaikoDifficultyCalculator.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Scoring\TaikoScoreProcessor.cs" />
|
||||
<Compile Include="UI\HitTarget.cs" />
|
||||
@ -100,4 +102,4 @@
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
</Project>
|
||||
|
@ -13,14 +13,14 @@ namespace osu.Game.Screens.Select.Leaderboards
|
||||
{
|
||||
public class DrawableRank : Container
|
||||
{
|
||||
private readonly Sprite sprite;
|
||||
private readonly Sprite rankSprite;
|
||||
|
||||
public ScoreRank Rank { get; private set; }
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(TextureStore textures)
|
||||
{
|
||||
sprite.Texture = textures.Get($@"Badges/ScoreRanks/{Rank.GetDescription()}");
|
||||
rankSprite.Texture = textures.Get($@"Grades/{Rank.GetDescription()}");
|
||||
}
|
||||
|
||||
public DrawableRank(ScoreRank rank)
|
||||
@ -29,10 +29,7 @@ namespace osu.Game.Screens.Select.Leaderboards
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
sprite = new Sprite
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
},
|
||||
rankSprite = new Sprite { FillMode = FillMode.Fill },
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user