Open sonygod opened 2 years ago
I want to put all callback function input a map,and recall that by map key ,I do a test,but not work
var cameraFunctionMap:Map<String, cpp.Callable<(x:Float, y:Float, z:Float) -> Void>> = [];
Main_UseMeFromC_regeditCallbackFunction(instance ,"camera_move", onCameraMove); Main_UseMeFromC_regeditCallbackFunction(instance, "camera_rotate", onCameraRotate); Main_UseMeFromC_regeditCallbackFunction(instance, "camera_zoom", onCameraZoom);
and haxe call
cameraFunctionMap["camera_move"](1,2,3);//not work?
I want to put all callback function input a map,and recall that by map key ,I do a test,but not work
Main_UseMeFromC_regeditCallbackFunction(instance ,"camera_move", onCameraMove); Main_UseMeFromC_regeditCallbackFunction(instance, "camera_rotate", onCameraRotate); Main_UseMeFromC_regeditCallbackFunction(instance, "camera_zoom", onCameraZoom);
and haxe call