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

Renaming + use IEnumerable.

This commit is contained in:
smoogipooo 2017-03-10 13:40:44 +09:00
parent 4015b87965
commit 2d6e667c7c
7 changed files with 11 additions and 8 deletions

View File

@ -80,7 +80,8 @@ namespace osu.Game.Modes.Catch
public override FontAwesome Icon => FontAwesome.fa_osu_fruits_o;
public override KeyCounter[] GameplayKeys => new KeyCounter[]
public override KeyCounter[] CreateGameplayKeys => new KeyCounter[]
{
new KeyCounterKeyboard(Key.ShiftLeft),
new KeyCounterMouse(MouseButton.Left),

View File

@ -100,7 +100,7 @@ namespace osu.Game.Modes.Mania
public override FontAwesome Icon => FontAwesome.fa_osu_mania_o;
public override KeyCounter[] GameplayKeys => new KeyCounter[] { /* Todo: Should be keymod specific */ };
public override KeyCounter[] CreateGameplayKeys => new KeyCounter[] { /* Todo: Should be keymod specific */ };
public override ScoreProcessor CreateScoreProcessor(int hitObjectCount = 0) => null;

View File

@ -112,7 +112,7 @@ namespace osu.Game.Modes.Osu
protected override PlayMode PlayMode => PlayMode.Osu;
public override KeyCounter[] GameplayKeys => new KeyCounter[]
public override KeyCounter[] CreateGameplayKeys => new KeyCounter[]
{
new KeyCounterKeyboard(Key.Z),
new KeyCounterKeyboard(Key.X),

View File

@ -80,7 +80,7 @@ namespace osu.Game.Modes.Taiko
public override FontAwesome Icon => FontAwesome.fa_osu_taiko_o;
public override KeyCounter[] GameplayKeys => new KeyCounter[]
public override KeyCounter[] CreateGameplayKeys => new KeyCounter[]
{
new KeyCounterKeyboard(Key.D),
new KeyCounterKeyboard(Key.F),

View File

@ -21,7 +21,7 @@ namespace osu.Game.Modes
public abstract class Ruleset
{
public abstract KeyCounter[] GameplayKeys { get; }
public abstract KeyCounter[] CreateGameplayKeys { get; }
private static ConcurrentDictionary<PlayMode, Type> availableRulesets = new ConcurrentDictionary<PlayMode, Type>();

View File

@ -10,6 +10,7 @@ using osu.Game.Graphics.UserInterface;
using osu.Game.Modes.Objects;
using osu.Game.Screens.Play;
using System;
using System.Collections.Generic;
namespace osu.Game.Modes.UI
{
@ -23,7 +24,7 @@ namespace osu.Game.Modes.UI
private Bindable<bool> showKeyCounter;
protected abstract KeyCounterCollection CreateKeyCounter(KeyCounter[] keyCounters);
protected abstract KeyCounterCollection CreateKeyCounter(IEnumerable<KeyCounter> keyCounters);
protected abstract ComboCounter CreateComboCounter();
protected abstract PercentageCounter CreateAccuracyCounter();
protected abstract ScoreCounter CreateScoreCounter();
@ -48,7 +49,7 @@ namespace osu.Game.Modes.UI
Children = new Drawable[]
{
KeyCounter = CreateKeyCounter(ruleset.GameplayKeys),
KeyCounter = CreateKeyCounter(ruleset.CreateGameplayKeys),
ComboCounter = CreateComboCounter(),
ScoreCounter = CreateScoreCounter(),
AccuracyCounter = CreateAccuracyCounter(),

View File

@ -7,6 +7,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Primitives;
using osu.Game.Graphics.UserInterface;
using osu.Game.Screens.Play;
using System.Collections.Generic;
namespace osu.Game.Modes.UI
{
@ -39,7 +40,7 @@ namespace osu.Game.Modes.UI
Margin = new MarginPadding { Top = 20 }
};
protected override KeyCounterCollection CreateKeyCounter(KeyCounter[] keyCounters) => new KeyCounterCollection
protected override KeyCounterCollection CreateKeyCounter(IEnumerable<KeyCounter> keyCounters) => new KeyCounterCollection
{
IsCounting = true,
FadeTime = 50,