Instance methods
Value equality based on Godot engine identity (instance ID or underlying pointer)
Source_godot_call_virtual(method_name : String, delta : Float64) : Void
Virtual method and property dispatch hooks overridden by class registration macros.
Delta timestep is received with 64-bit precision (Float64).
Source_godot_call_virtual_with_data(method_name : String, args : Pointer(Pointer(Void)), ret : Pointer(Void)) : Void
Dispatches generic virtual methods with raw arguments and return buffer.
Source_godot_get_property(prop_name : String, ret_ptr : Pointer(Void)) : Void
Invoked by the GDExtension bridge when retrieving an exposed @export property.
Source_godot_set_property(prop_name : String, val_ptr : Pointer(Void)) : Void
Invoked by the GDExtension bridge when setting an exposed @export property.
Sourceadd_user_signal(signal : String, arguments : Godot::Array) : Void
Sourcealive?
Returns true if this object instance has a valid engine pointer and is alive in Godot's ObjectDB
Sourceawait_signal(signal_name :
String, timeout_sec :
Float64 |
Nil = nil) :
Array(
Variant)
Cooperatively awaits a signal emitted on this object.
Sourcecall(method : String, *args) : Pointer(Void)
Calls the named method on the object with variable arguments.
Sourcecall_bool(method : String, *args) : Bool
Calls the named method and returns the result as Bool
Sourcecall_deferred(method : String, *args) : Pointer(Void)
Calls the named method on the object during idle time.
Sourcecall_f64(method : String, *args) : Float64
Calls the named method and returns the result as Float64
Sourcecall_i64(method : String, *args) : Int64
Calls the named method and returns the result as Int64
Sourcecall_obj(method : String, *args) : Node | Nil
Calls the named method and returns an Object/Node (or nil if null)
Sourcecall_obj_as(type : T.class, method : String, *args) : T | Nil forall T
Calls the named method and returns the result cast to T (or nil if null)
Sourcecall_str(method : String, *args) : String
Calls the named method and returns the result as String
Sourcecallv(method : String, arg_array : Godot::Array) : Pointer(Void)
Sourcecheck_alive!
Validates that the underlying engine object is still alive before executing bridge calls.
Raises DisposedObjectError if the object was destroyed by GDScript, engine, or Crystal.
Sourceconnect(signal_name :
String, flags :
Godot::ConnectFlags = ::
Godot::ConnectFlags::None, callback :
Proc(
Array(
Variant),
Void) |
Nil = nil) :
SignalSubscription Connects a callback proc to the named signal.
Sourceconnect(signal_name :
String, flags :
Godot::ConnectFlags = ::
Godot::ConnectFlags::None, &block :
Array(
Variant) ->
Void) :
SignalSubscription Connects a callback block accepting Array(Variant) to the named signal.
Sourceconnect(signal_name :
String, listener_target :
Godot::Object, method_name :
Symbol, flags :
Godot::ConnectFlags = ::
Godot::ConnectFlags::None) :
SignalSubscription Connects the named signal to a method call on a listener target by symbol name.
Sourceconnect(signal : String, callable : Pointer(Void), flags : Int64) : Int64
Sourceconnect_one_shot(signal_name :
String, &block :
Array(
Variant) ->
Void) :
SignalSubscription Connects a one-shot callback block to the named signal (backwards compatibility).
Sourcedestroy
Destroys this Object in the Godot engine and invalidates the Crystal pointer.
Sourcedisconnect(signal : String, callable : Pointer(Void)) : Void
Sourcedisconnect(signal_name : String) : Void
Disconnects all signal subscriptions for the named signal on this object.
Sourceeditor_hint?
Returns true if running inside the Godot Editor
Sourceemit_signal(name : String) : Void
Emits a parameterless signal on this Godot object.
Sourceemit_signal(name : String, *args) : Void
Emits a signal with variable arguments on this Godot object.
Sourcefree
Destroys this Object in the Godot engine (alias to #destroy).
Sourceget(property : String) : Pointer(Void)
Sourceget_incoming_connections
Sourceget_indexed(property_path : NodePath) : Pointer(Void)
Sourceget_method_argument_count(method : String) : Int64
Sourceget_signal_connection_list(signal : String) : Godot::Array
Sourceget_translation_domain
Sourcehas_connections(signal : String) : Bool
Sourcehas_method(method : String) : Bool
Sourcehas_signal(signal : String) : Bool
Sourcehas_signal?(signal_name : String) : Bool
Returns true if this object or its registered class defines the given signal.
Sourcehas_user_signal(signal : String) : Bool
Sourcehash(hasher)
Hashing based on engine instance ID for use in Sets and Hash keys
Sourceif_alive
Convenient nil-coalescing helper: returns self if alive, otherwise nil
Sourceis_class(godot_class : String) : Bool
Sourceis_connected(signal : String, callable : Pointer(Void)) : Bool
Sourcelink_class_script
Automatically links this node's registered CrystalScript resource if running inside the Godot Editor
Sourcenotification(what : Int64, reversed : Bool) : Void
Sourcenotify_property_list_changed
Sourcepointer=(val : Pointer(Void))
Sourceprint(*args)
Prints a message to Godot's debug console.
Sourceprinterr(*args)
Prints an error message to Godot's error console.
Sourceproperty_can_revert(property : String) : Bool
Sourceproperty_get_revert(property : String) : Pointer(Void)
Sourceputs(*args)
Prints a message to Godot's debug console.
Sourceremove_user_signal(signal : String) : Void
Sourceset(property : String, value : Pointer(Void)) : Void
Sourceset_block_signals(enable : Bool) : Void
Sourceset_deferred(property : String, value : Pointer(Void)) : Void
Sourceset_indexed(property_path : NodePath, value : Pointer(Void)) : Void
Sourceset_message_translation(enable : Bool) : Void
Sourceset_script(script : Pointer(Void)) : Void
Sourceset_translation_domain(domain : String) : Void
SourceReturns a bound signal representation for the named signal.
Enables idiomatic usage: enemy.signal("died").await or button.signal("pressed").connect { ... }.
Sourcesignal_connection_count(signal_name : String) : Int32
Returns the count of active subscriptions for the given signal on this object.
Sourcesignal_target_id
Identifier used for signal routing and lifecycle tracking (engine instance ID or Crystal object_id)
Sourceto_s(io : IO) : Void
Appends a short String representation of this object
which includes its class name and its object address.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).to_s # => #<Person:0x10a199f20>
Sourceto_unsafe
Idiomatic Crystal pointer conversion
Sourcetr(message : String, context : String) : String
Sourcetr_n(message : String, plural_message : String, n : Int64, context : String) : String
Source