PlayerMessage.Targetpublic abstract static class ActionSchedule.PlayerTarget extends Object implements PlayerMessage.Target
PlayerMessage.Target which has access to the player when handling messages.
Can be used with ActionSchedule.Builder.sendMessage(Target, long).
The target can be passed to ActionSchedule.Builder.waitForMessage(PlayerTarget) to
wait for a message to arrive at the target.
| Modifier and Type | Class | Description |
|---|---|---|
static interface |
ActionSchedule.PlayerTarget.Callback |
Callback to be called when message arrives.
|
| Constructor | Description |
|---|---|
PlayerTarget() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
handleMessage(int messageType,
Object message) |
Handles a message delivered to the target.
|
abstract void |
handleMessage(SimpleExoPlayer player,
int messageType,
Object message) |
Handles the message send to the component and additionally provides access to the player.
|
void |
setCallback(ActionSchedule.PlayerTarget.Callback callback) |
public void setCallback(ActionSchedule.PlayerTarget.Callback callback)
public abstract void handleMessage(SimpleExoPlayer player, int messageType, @Nullable Object message)
public final void handleMessage(int messageType,
@Nullable
Object message)
PlayerMessage.TargethandleMessage in interface PlayerMessage.TargetmessageType - The message type.message - The message payload.