mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 20:12:57 +08:00
Simplify OsuActionInputManager property
This commit is contained in:
parent
529732ea47
commit
44feef78f1
@ -53,18 +53,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
private readonly WeakReference<OsuInputManager> osuActionInputManager = new WeakReference<OsuInputManager>(null);
|
private OsuInputManager osuActionInputManager;
|
||||||
internal OsuInputManager OsuActionInputManager
|
internal OsuInputManager OsuActionInputManager => osuActionInputManager ?? (osuActionInputManager = GetContainingInputManager() as OsuInputManager);
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
OsuInputManager target;
|
|
||||||
if (osuActionInputManager.TryGetTarget(out target)) return target;
|
|
||||||
target = GetContainingInputManager() as OsuInputManager;
|
|
||||||
osuActionInputManager.SetTarget(target);
|
|
||||||
return target;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum ComboResult
|
public enum ComboResult
|
||||||
|
Loading…
Reference in New Issue
Block a user