utopia-rise / godot-kotlin-native

Kotlin bindings for Godot Engine
MIT License
290 stars 16 forks source link

Register functions, properties and signals snake case #216

Closed chippmann closed 4 years ago

chippmann commented 4 years ago

Resolves #141

raniejade commented 4 years ago

Also we probably need a specialized extension for callDeferred.

inline fun <reified T: KFunction<*>> Object.callDeferred(method: T, vararg args: Any?) {
    callDeferred(method.name, args)
}

class S : Node() {

    @RegisterFunction
    override fun _ready() {
        callDeferred(this::fooBar)
    }

    @RegisterFunction
    fun fooBar() {

    }
}