Commit b0bdea90 authored by Chunchi Che's avatar Chunchi Che

add hover action

parent f788671c
...@@ -40,5 +40,14 @@ export default (hands: Card[], scene: BABYLON.Scene) => { ...@@ -40,5 +40,14 @@ export default (hands: Card[], scene: BABYLON.Scene) => {
} }
) )
); );
// 监听`Hover`事件
hand.actionManager.registerAction(
new BABYLON.ExecuteCodeAction(
BABYLON.ActionManager.OnPointerOverTrigger,
(event) => {
console.log(`<Hover>hand: ${idx}`, "card:", item, "event:", event);
}
)
);
}); });
}; };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment