Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avatar onClick not dispatched when AvatarAction.Walk is enabled #129

Open
sindreslungaard opened this issue Mar 3, 2021 · 0 comments
Open

Comments

@sindreslungaard
Copy link
Contributor

After update ^0.7, when you click on a part of the avatar except the head, the avatars onClick event is not dispatched.

Example:

let shroom = Shroom.create({ application: app, resourcePath: "./resources/flash" })

let room = Room.create(shroom, {
    tilemap: `
    xxxxxxxxx
    x00000000
    000000000
    x00000000
    xxxxxxxxx
    `,
})

let avatar = new Avatar({
    look: "hd-180-2.hr-100-61.ch-210-66.lg-270-81.sh-290-62",
    direction: 2,
    roomX: 1,
    roomY: 1,
    roomZ: 0,
})

avatar.onClick = () => {
    console.log("Avatar clicked")
}

avatar.addAction(AvatarAction.Move) // remove this line and onClick works as expected

room.addRoomObject(avatar)
app.stage.addChild(room)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant