Advertisement
Guest User

Untitled

a guest
Mar 28th, 2015
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. var bbAdmob = Globals.get_singleton("bbAdmob")
  2.  
  3. #javaModule can call functions and pass parameters to the class defined in the Java Module I defined.
  4.  
  5. so now I want to send data back from the java side of the wall into GDScript.
  6. The documentation says to use this function declaration
  7.  
  8. GodotLib.calldeferred(<instanceid>, "<function>", new Object[]{param1,param2,etc})
  9.  
  10. I have the instance id, I define a function and set some parameters,
  11. ex: GodotLib.calldeferred(m_device_id, "this_is_a_test", new Object[]{31, "thirty one", (float)31,(boolean)true, "False"});
  12.  
  13. I can see something is happening because in the adb logcat displays this,
  14.  
  15. I/godot ( 8513): ARGNAME: java.lang.Integer
  16. I/godot ( 8513): ARGNAME: java.lang.String
  17. I/godot ( 8513): ARGNAME: java.lang.Float
  18. I/godot ( 8513): ARGNAME: java.lang.Boolean
  19. I/godot ( 8513): ARGNAME: java.lang.String
  20.  
  21. Those match the function that I setup but in GDScript I can't just do
  22.  
  23. bbAdmob.do_something_in_java()
  24. #java code gets done
  25.  
  26. How do I run this:GodotLib.calldeferred(<instanceid>, "<function>", new Object[]{param1,param2,etc})
  27. to get these params back to GDScript
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement