haxiomic / haxe-c-bridge

Easily interact with haxe classes from C with an automatically generated C header
MIT License
51 stars 5 forks source link

Is this not support Map? #42

Open sonygod opened 2 years ago

sonygod commented 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?