Player move API wip
This commit is contained in:
parent
e0e1a7e76a
commit
29e44d3023
7 changed files with 297 additions and 0 deletions
|
@ -84,6 +84,13 @@ export class WorkadventurePlayerCommands extends IframeApiContribution<Workadven
|
|||
});
|
||||
}
|
||||
|
||||
public async walkTo(x: number, y: number, speed: number): Promise<{ x: number; y: number }> {
|
||||
return await queryWorkadventure({
|
||||
type: "walkPlayerTo",
|
||||
data: { x, y, speed },
|
||||
});
|
||||
}
|
||||
|
||||
get userRoomToken(): string | undefined {
|
||||
if (userRoomToken === undefined) {
|
||||
throw new Error(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue