little fixes for moveTo example and with event return data
This commit is contained in:
@@ -16,10 +16,19 @@
|
||||
randomChainedMovementButton.addEventListener('click', async () => {
|
||||
try {
|
||||
WA.player.moveTo(100, 100, 10).then((result) => {
|
||||
if (result.cancelled) {
|
||||
return;
|
||||
}
|
||||
console.log(result);
|
||||
WA.player.moveTo(500, 100, 20).then((result) => {
|
||||
if (result.cancelled) {
|
||||
return;
|
||||
}
|
||||
console.log(result);
|
||||
WA.player.moveTo(500, 500, 10).then((result) => {
|
||||
if (result.cancelled) {
|
||||
return;
|
||||
}
|
||||
console.log(result);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user