Commit b92bb5f2 authored by Chunchi Che's avatar Chunchi Che

update setupHandInteractivity

parent 5a313ce6
......@@ -2,6 +2,7 @@ import * as BABYLON from "@babylonjs/core";
import * as BABYLON_GUI from "@babylonjs/gui";
import * as CONFIG from "../../../config/ui";
import { Card, InteractType } from "../../../reducers/duel/util";
import { sendSelectIdleCmdResponse } from "../../../api/ocgcore/ocgHelper";
export default (hands: Card[], scene: BABYLON.Scene) => {
const handShape = CONFIG.HandShape();
......@@ -87,6 +88,8 @@ function setupHandInteractivity(
button.color = "white";
button.onPointerClickObservable.add(() => {
console.log(`<Interact>hand ${handIdx}`);
sendSelectIdleCmdResponse(interactivities[i].response);
});
advancedTexture.addControl(button);
......
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