mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 08:49:59 +09:00
Update code style
Sorry, bot overlords.
This commit is contained in:
@ -9,7 +9,7 @@ using System.Collections.Generic;
|
|||||||
|
|
||||||
namespace osu.Game.Rulesets.Mania
|
namespace osu.Game.Rulesets.Mania
|
||||||
{
|
{
|
||||||
public class ManiaDifficultyCalculator : DifficultyCalculator<ManiaHitObject>
|
internal class ManiaDifficultyCalculator : DifficultyCalculator<ManiaHitObject>
|
||||||
{
|
{
|
||||||
private const double star_scaling_factor = 0.018;
|
private const double star_scaling_factor = 0.018;
|
||||||
|
|
||||||
@ -18,12 +18,12 @@ namespace osu.Game.Rulesets.Mania
|
|||||||
/// This is to eliminate higher influence of stream over aim by simply having more HitObjects with high strain.
|
/// This is to eliminate higher influence of stream over aim by simply having more HitObjects with high strain.
|
||||||
/// The higher this value, the less strains there will be, indirectly giving long beatmaps an advantage.
|
/// The higher this value, the less strains there will be, indirectly giving long beatmaps an advantage.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected const double strain_step = 400;
|
private const double strain_step = 400;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The weighting of each strain value decays to this number * it's previous value
|
/// The weighting of each strain value decays to this number * it's previous value
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected const double decay_weight = 0.9;
|
private const double decay_weight = 0.9;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// HitObjects are stored as a member variable.
|
/// HitObjects are stored as a member variable.
|
||||||
@ -40,7 +40,7 @@ namespace osu.Game.Rulesets.Mania
|
|||||||
// Fill our custom DifficultyHitObject class, that carries additional information
|
// Fill our custom DifficultyHitObject class, that carries additional information
|
||||||
difficultyHitObjects.Clear();
|
difficultyHitObjects.Clear();
|
||||||
|
|
||||||
int columnCount = (Beatmap as ManiaBeatmap).TotalColumns;
|
int columnCount = (Beatmap as ManiaBeatmap)?.TotalColumns ?? 7;
|
||||||
|
|
||||||
foreach (var hitObject in Beatmap.HitObjects)
|
foreach (var hitObject in Beatmap.HitObjects)
|
||||||
difficultyHitObjects.Add(new ManiaHitObjectDifficulty(hitObject, columnCount));
|
difficultyHitObjects.Add(new ManiaHitObjectDifficulty(hitObject, columnCount));
|
||||||
|
@ -6,7 +6,7 @@ using System;
|
|||||||
|
|
||||||
namespace osu.Game.Rulesets.Mania.Objects
|
namespace osu.Game.Rulesets.Mania.Objects
|
||||||
{
|
{
|
||||||
class ManiaHitObjectDifficulty
|
internal class ManiaHitObjectDifficulty
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Factor by how much individual / overall strain decays per second.
|
/// Factor by how much individual / overall strain decays per second.
|
||||||
@ -19,7 +19,7 @@ namespace osu.Game.Rulesets.Mania.Objects
|
|||||||
|
|
||||||
internal ManiaHitObject BaseHitObject;
|
internal ManiaHitObject BaseHitObject;
|
||||||
|
|
||||||
private int beatmapColumnCount;
|
private readonly int beatmapColumnCount;
|
||||||
|
|
||||||
|
|
||||||
private double endTime;
|
private double endTime;
|
||||||
@ -68,7 +68,6 @@ namespace osu.Game.Rulesets.Mania.Objects
|
|||||||
internal void CalculateStrains(ManiaHitObjectDifficulty previousHitObject, double timeRate)
|
internal void CalculateStrains(ManiaHitObjectDifficulty previousHitObject, double timeRate)
|
||||||
{
|
{
|
||||||
// TODO: Factor in holds
|
// TODO: Factor in holds
|
||||||
double addition = 1.0;
|
|
||||||
double timeElapsed = (BaseHitObject.StartTime - previousHitObject.BaseHitObject.StartTime) / timeRate;
|
double timeElapsed = (BaseHitObject.StartTime - previousHitObject.BaseHitObject.StartTime) / timeRate;
|
||||||
double individualDecay = Math.Pow(INDIVIDUAL_DECAY_BASE, timeElapsed / 1000);
|
double individualDecay = Math.Pow(INDIVIDUAL_DECAY_BASE, timeElapsed / 1000);
|
||||||
double overallDecay = Math.Pow(OVERALL_DECAY_BASE, timeElapsed / 1000);
|
double overallDecay = Math.Pow(OVERALL_DECAY_BASE, timeElapsed / 1000);
|
||||||
@ -106,9 +105,9 @@ namespace osu.Game.Rulesets.Mania.Objects
|
|||||||
heldUntil[BaseHitObject.Column] = endTime;
|
heldUntil[BaseHitObject.Column] = endTime;
|
||||||
|
|
||||||
// Increase individual strain in own column
|
// Increase individual strain in own column
|
||||||
IndividualStrain += (2.0/* + (double)SpeedMania.Column / 8.0*/) * holdFactor;
|
IndividualStrain += 2.0 * holdFactor;
|
||||||
|
|
||||||
OverallStrain = previousHitObject.OverallStrain * overallDecay + (addition + holdAddition) * holdFactor;
|
OverallStrain = previousHitObject.OverallStrain * overallDecay + (1.0 + holdAddition) * holdFactor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user