All Downloads are FREE. Search and download functionalities are using the official Maven repository.

godot.core.bridge.Callable.kt Maven / Gradle / Ivy

There is a newer version: 0.10.0-4.3.0
Show newest version
@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)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy