mirror of
https://github.com/ppy/osu
synced 2024-12-23 23:33:36 +00:00
Don't use LINQ in ReceivePositionalInputAt
This commit is contained in:
parent
7dba870518
commit
8e20eed4ef
@ -42,7 +42,16 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
}
|
||||
}
|
||||
|
||||
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => stages.Any(s => s.ReceivePositionalInputAt(screenSpacePos));
|
||||
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos)
|
||||
{
|
||||
foreach (var s in stages)
|
||||
{
|
||||
if (s.ReceivePositionalInputAt(screenSpacePos))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public ManiaPlayfield(List<StageDefinition> stageDefinitions)
|
||||
{
|
||||
|
@ -44,7 +44,16 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
|
||||
private readonly Drawable barLineContainer;
|
||||
|
||||
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => Columns.Any(c => c.ReceivePositionalInputAt(screenSpacePos));
|
||||
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos)
|
||||
{
|
||||
foreach (var c in Columns)
|
||||
{
|
||||
if (c.ReceivePositionalInputAt(screenSpacePos))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private readonly int firstColumnIndex;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user