godot.core.bridge.Callable.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of godot-library-release Show documentation
Show all versions of godot-library-release Show documentation
Contains godot api as kotlin classes and jvm cpp interaction code.
@file:JvmName("Callables")
@file:Suppress("PackageDirectoryMismatch")
package godot.core
import godot.Object
interface Callable: CoreType {
fun call(vararg args: Any?): Any?
companion object {
@JvmStatic
@JvmName("create")
operator fun invoke() = NativeCallable()
@JvmStatic
@JvmName("create")
operator fun invoke(target: Object, methodName: StringName) = NativeCallable(target, methodName)
@JvmStatic
@JvmName("create")
operator fun invoke(nativeCallable: NativeCallable) = NativeCallable(nativeCallable)
@JvmStatic
@JvmName("create")
operator fun invoke(lambdaCallable: LambdaCallable<*>) = NativeCallable(lambdaCallable)
}
}