Don't use a List for HitKeys.

This commit is contained in:
smoogipooo
2017-03-29 15:35:22 +09:00
parent 7ee7954f62
commit 7ba7bc18f8
6 changed files with 6 additions and 11 deletions

View File

@ -6,7 +6,6 @@ using OpenTK.Graphics;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Testing; using osu.Framework.Testing;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Modes.Taiko.Objects.Drawable.Pieces; using osu.Game.Modes.Taiko.Objects.Drawable.Pieces;

View File

@ -1,7 +1,6 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using OpenTK.Input; using OpenTK.Input;
using osu.Game.Modes.Taiko.Objects.Drawable.Pieces; using osu.Game.Modes.Taiko.Objects.Drawable.Pieces;
using osu.Game.Graphics; using osu.Game.Graphics;
@ -11,7 +10,7 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable
{ {
public class DrawableCentreHit : DrawableHit public class DrawableCentreHit : DrawableHit
{ {
protected override List<Key> HitKeys { get; } = new List<Key>(new[] { Key.F, Key.J }); protected override Key[] HitKeys { get; } = { Key.F, Key.J };
private readonly CirclePiece circlePiece; private readonly CirclePiece circlePiece;

View File

@ -7,7 +7,7 @@ using osu.Framework.Graphics.Containers;
using osu.Game.Modes.Objects.Drawables; using osu.Game.Modes.Objects.Drawables;
using osu.Game.Modes.Taiko.Judgements; using osu.Game.Modes.Taiko.Judgements;
using System; using System;
using System.Collections.Generic; using System.Linq;
namespace osu.Game.Modes.Taiko.Objects.Drawable namespace osu.Game.Modes.Taiko.Objects.Drawable
{ {
@ -16,7 +16,7 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable
/// <summary> /// <summary>
/// A list of keys which can result in hits for this HitObject. /// A list of keys which can result in hits for this HitObject.
/// </summary> /// </summary>
protected abstract List<Key> HitKeys { get; } protected abstract Key[] HitKeys { get; }
protected override Container<Framework.Graphics.Drawable> Content => bodyContainer; protected override Container<Framework.Graphics.Drawable> Content => bodyContainer;

View File

@ -1,7 +1,6 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Game.Graphics; using osu.Game.Graphics;
using OpenTK.Input; using OpenTK.Input;
@ -11,7 +10,7 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable
{ {
public class DrawableRimHit : DrawableHit public class DrawableRimHit : DrawableHit
{ {
protected override List<Key> HitKeys { get; } = new List<Key>(new[] { Key.D, Key.K }); protected override Key[] HitKeys { get; } = { Key.D, Key.K };
private readonly CirclePiece circlePiece; private readonly CirclePiece circlePiece;

View File

@ -1,7 +1,6 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using OpenTK.Input; using OpenTK.Input;
using osu.Game.Modes.Taiko.Objects.Drawable.Pieces; using osu.Game.Modes.Taiko.Objects.Drawable.Pieces;
using osu.Framework.Allocation; using osu.Framework.Allocation;
@ -11,7 +10,7 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable
{ {
public class DrawableStrongCentreHit : DrawableStrongHit public class DrawableStrongCentreHit : DrawableStrongHit
{ {
protected override List<Key> HitKeys { get; } = new List<Key>(new[] { Key.F, Key.J }); protected override Key[] HitKeys { get; } = { Key.F, Key.J };
private readonly CirclePiece circlePiece; private readonly CirclePiece circlePiece;

View File

@ -1,7 +1,6 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Game.Graphics; using osu.Game.Graphics;
using OpenTK.Input; using OpenTK.Input;
@ -11,7 +10,7 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable
{ {
public class DrawableStrongRimHit : DrawableStrongHit public class DrawableStrongRimHit : DrawableStrongHit
{ {
protected override List<Key> HitKeys { get; } = new List<Key>(new[] { Key.D, Key.K }); protected override Key[] HitKeys { get; } = { Key.D, Key.K };
private readonly CirclePiece circlePiece; private readonly CirclePiece circlePiece;