mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 13:32:54 +08:00
Merge pull request #502 from smoogipooo/taiko_bash_base
Taiko bash base
This commit is contained in:
commit
5138890530
30
osu.Game.Modes.Taiko/Objects/Bash.cs
Normal file
30
osu.Game.Modes.Taiko/Objects/Bash.cs
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
// 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.Timing;
|
||||||
|
using osu.Game.Database;
|
||||||
|
using osu.Game.Modes.Objects.Types;
|
||||||
|
|
||||||
|
namespace osu.Game.Modes.Taiko.Objects
|
||||||
|
{
|
||||||
|
public class Bash : TaikoHitObject, IHasEndTime
|
||||||
|
{
|
||||||
|
public double EndTime { get; set; }
|
||||||
|
|
||||||
|
public double Duration => EndTime - StartTime;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The number of hits required to complete the bash successfully.
|
||||||
|
/// </summary>
|
||||||
|
public int RequiredHits { get; protected set; }
|
||||||
|
|
||||||
|
public override void ApplyDefaults(TimingInfo timing, BeatmapDifficulty difficulty)
|
||||||
|
{
|
||||||
|
base.ApplyDefaults(timing, difficulty);
|
||||||
|
|
||||||
|
double spinnerRotationRatio = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 3, 5, 7.5);
|
||||||
|
RequiredHits = (int)Math.Max(1, Duration / 1000f * spinnerRotationRatio);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -51,6 +51,7 @@
|
|||||||
<Compile Include="Beatmaps\TaikoBeatmapProcessor.cs" />
|
<Compile Include="Beatmaps\TaikoBeatmapProcessor.cs" />
|
||||||
<Compile Include="Judgements\TaikoJudgementInfo.cs" />
|
<Compile Include="Judgements\TaikoJudgementInfo.cs" />
|
||||||
<Compile Include="Judgements\TaikoHitResult.cs" />
|
<Compile Include="Judgements\TaikoHitResult.cs" />
|
||||||
|
<Compile Include="Objects\Bash.cs" />
|
||||||
<Compile Include="Objects\DrumRoll.cs" />
|
<Compile Include="Objects\DrumRoll.cs" />
|
||||||
<Compile Include="Objects\DrumRollTick.cs" />
|
<Compile Include="Objects\DrumRollTick.cs" />
|
||||||
<Compile Include="TaikoDifficultyCalculator.cs" />
|
<Compile Include="TaikoDifficultyCalculator.cs" />
|
||||||
|
Loading…
Reference in New Issue
Block a user