外观
player_state API
模块说明
text
Single-owner projection of the core's observed player maps.
No callbacks, threads or invented join events. A fault clears state permanently;
create a new instance from a new atomic snapshot. Returned snapshots are copies.PlayerState
python
class PlayerStateSDK 说明:
text
Bounded current state, not history or a complete-roster assertion.
At most 4096 entries in each of three maps and 8 MiB charged payload. Python
object overhead, incoming document, copy-on-update and caller snapshots are
additional; at most old plus replacement map payload coexist during apply.
Call from one owner; this class is not a concurrent synchronization primitive.PlayerState.__init__
python
def __init__(self, snapshot)PlayerState.epoch
python
@property
def epoch(self)PlayerState.revision
python
@property
def revision(self)PlayerState.apply
python
def apply(self, observation, *, epoch)SDK 说明:
text
Apply exactly the next revision, atomically for the single owner.PlayerState.snapshot
python
def snapshot(self)SDK 说明:
text
Return an independent current snapshot; does not emit player events.