Table of Contents

Class MapInputArbiter

Namespace
LansMap.Core.Control

Frame-scoped arbitration so one pointer press drives exactly one tool.

public sealed class MapInputArbiter
Inheritance
object
MapInputArbiter

Remarks

Within a frame the first claimant wins; a later claimant takes over only when it strictly outranks the current claimant. A null claimant never claims. The caller supplies the frame counter; this type is pure and has no Unity frame loop of its own.

Methods

OwnsEscape(long, object)

True when the given tool still holds this frame's escape.

public bool OwnsEscape(long frame, object owner)

Parameters

frame long

Caller-supplied frame counter.

owner object

Returns

bool

False if another tool preempted after the claim.

OwnsPress(long, object)

True when the given tool still holds this frame's press.

public bool OwnsPress(long frame, object owner)

Parameters

frame long

Caller-supplied frame counter.

owner object

Returns

bool

False if another tool preempted after the claim.

PressClaimed(long)

True when any tool has claimed this frame's press.

public bool PressClaimed(long frame)

Parameters

frame long

Caller-supplied frame counter.

Returns

bool

True if this frame already has a press claim.

Reset()

Clears press and escape claims so the next claim starts a new frame.

public void Reset()

TryClaimEscape(long, object, MapInputPriority)

Claims this frame's escape key using a shipped priority tier (null tool is rejected).

public bool TryClaimEscape(long frame, object owner, MapInputPriority priority)

Parameters

frame long

Caller-supplied frame counter.

owner object
priority MapInputPriority

Shipped rank; higher wins.

Returns

bool

True when the caller may handle escape this frame.

TryClaimEscape(long, object, int)

Claims this frame's escape key for the given tool (null is rejected).

public bool TryClaimEscape(long frame, object owner, int priority)

Parameters

frame long

Caller-supplied frame counter.

owner object
priority int

Rank; higher wins. Typically a MapInputPriority value.

Returns

bool

True when the caller may handle escape this frame.

Remarks

Escape means cancel the innermost thing: the active tool outranks reset-view, so one press never does both.

TryClaimPress(long, object, MapInputPriority)

Claims this frame's pointer press using a shipped priority tier (null tool is rejected).

public bool TryClaimPress(long frame, object owner, MapInputPriority priority)

Parameters

frame long

Caller-supplied frame counter.

owner object
priority MapInputPriority

Shipped rank; higher wins.

Returns

bool

True when the caller may act on this frame's press.

TryClaimPress(long, object, int)

Claims this frame's pointer press for the given tool (null is rejected).

public bool TryClaimPress(long frame, object owner, int priority)

Parameters

frame long

Caller-supplied frame counter.

owner object
priority int

Rank; higher wins. Typically a MapInputPriority value.

Returns

bool

True when the caller may act on this frame's press.