Uses the current player position rather than the starting one to position iframe
This commit is contained in:
parent
c5f96a76ad
commit
a22c2a09b8
4 changed files with 37 additions and 0 deletions
|
@ -70,6 +70,20 @@ export class WorkadventurePlayerCommands extends IframeApiContribution<Workadven
|
|||
}
|
||||
return uuid;
|
||||
}
|
||||
|
||||
async getPosition(): Promise<Position> {
|
||||
//TODO: type
|
||||
return await queryWorkadventure({
|
||||
type: "getPlayerPosition",
|
||||
data: undefined,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: move or delete
|
||||
type Position = {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
|
||||
export default new WorkadventurePlayerCommands();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue