optional following path movement speed
This commit is contained in:
parent
9b94705177
commit
c023c4f8fd
5 changed files with 30 additions and 8 deletions
|
@ -4,7 +4,7 @@ export const isMovePlayerToEventConfig = new tg.IsInterface()
|
|||
.withProperties({
|
||||
x: tg.isNumber,
|
||||
y: tg.isNumber,
|
||||
speed: tg.isNumber,
|
||||
speed: tg.isOptional(tg.isNumber),
|
||||
})
|
||||
.get();
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ export class WorkadventurePlayerCommands extends IframeApiContribution<Workadven
|
|||
});
|
||||
}
|
||||
|
||||
public async moveTo(x: number, y: number, speed: number): Promise<{ x: number; y: number }> {
|
||||
public async moveTo(x: number, y: number, speed?: number): Promise<{ x: number; y: number }> {
|
||||
return await queryWorkadventure({
|
||||
type: "movePlayerTo",
|
||||
data: { x, y, speed },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue