Make mania work with key bindings

This commit is contained in:
smoogipooo
2017-08-23 13:42:11 +09:00
parent 84dd1283de
commit d8dfcc614a
8 changed files with 146 additions and 189 deletions

View File

@ -5,9 +5,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using OpenTK;
using OpenTK.Input;
using osu.Framework.Allocation;
using osu.Framework.Configuration;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Graphics;
using osu.Framework.Input;
@ -109,15 +107,15 @@ namespace osu.Game.Rulesets.Mania.UI
protected override DrawableHitObject<ManiaHitObject, ManiaJudgement> GetVisualRepresentation(ManiaHitObject h)
{
Bindable<Key> key = Playfield.Columns.ElementAt(h.Column).Key;
ManiaAction action = Playfield.Columns.ElementAt(h.Column).Action;
var holdNote = h as HoldNote;
if (holdNote != null)
return new DrawableHoldNote(holdNote, key);
return new DrawableHoldNote(holdNote, action);
var note = h as Note;
if (note != null)
return new DrawableNote(note, key);
return new DrawableNote(note, action);
return null;
}