Signal1
Signal support.
MainLoop.swift:123class Signal1
Use the connect(flags:_:)
method to connect to the signal on the container object, and disconnect(_:)
to drop the connection.
You can also await the emitted
property for waiting for a single emission of the signal.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (16) members.
Type members
static let notificationApplicationFocusIn: Int
Notification received from the OS when the application is focused, i.e. when changing the focus from the OS desktop or a thirdparty application to any open window of the Godot instance.
static let notificationApplicationFocusOut: Int
Notification received from the OS when the application is defocused, i.e. when changing the focus from any open window of the Godot instance to the OS desktop or a thirdparty application.
static let notificationApplicationPaused: Int
Notification received from the OS when the application is paused.
static let notificationApplicationResumed: Int
Notification received from the OS when the application is resumed.
static let notificationCrash: Int
Notification received from Godot’s crash handler when the engine is about to crash.
static let notificationOsImeUpdate: Int
Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string).
static let notificationOsMemoryWarning: Int
Notification received from the OS when the application is exceeding its allocated memory.
static let notificationTextServerChanged: Int
Notification received when text server is changed.
static let notificationTranslationChanged: Int
Notification received when translations may have changed. Can be triggered by the user changing the locale. Can be used to respond to language changes, for example to change the UI strings on the fly. Useful when working with the built-in translation support, like
tr(message:context:)
.static let notificationWmAbout: Int
Notification received from the OS when a request for “About” information is sent.
class var godotClassName: StringName
Instance members
var onRequestPermissionsResult: Signal1
Emitted when a user responds to a permission request.
Show implementation details (4)
Hide implementation details
func _finalize(
) Called before the program exits.
func _initialize(
) Called once during initialization.
func _physicsProcess(delta: Double
) -> Bool Called each physics frame with the time since the last physics frame as argument (
delta
, in seconds). Equivalent to_physicsProcess(delta:)
.func _process(delta: Double
) -> Bool Called each process (idle) frame with the time since the last process frame as argument (in seconds). Equivalent to
_process(delta:)
.
Citizens in SwiftGodot
Instance members
var emitted: Void
You can await this property to wait for the signal to be emitted once
func connect(flags: Object.ConnectFlags, @escaping (_ permission: String, _ granted: Bool) -> ()
) -> Object Connects the signal to the specified callback
func disconnect(Object
) Disconnects a signal that was previously connected, the return value from calling
connect(flags:_:)