Rearrangements

This commit is contained in:
Ruslan Mustakov 2017-07-25 11:03:55 +07:00
commit 1e6646713f
6 changed files with 31 additions and 19 deletions

View file

@ -28,14 +28,6 @@ proc call*(methodBind: ptr GodotMethodBind;
callError: var VariantCallError): Variant {.
importc: "godot_method_bind_call", header: "../godot.h".}
var getClassMethodBind {.threadvar.}: ptr GodotMethodBind
proc getClassName*(o: ptr GodotObject): string =
if getClassMethodBind.isNil:
getClassMethodBind = getMethod(cstring"Object", cstring"get_class")
var ret: GodotString
getClassMethodBind.ptrCall(o, nil, addr ret)
result = $ret
# Script API
type