class Godot::SceneTree

Overview

Manages the hierarchy of scene nodes and execution loops.

Defined in:

lapis.cr:79
lapis.cr:658
libgodot/generated/classes/classes_part5.cr
libgodot/object.cr

Constructors

Instance Method Summary

Constructor methods inherited from class Godot::MainLoop

new(pointer : Pointer(Void) = Pointer(Void).null) new

Instance methods inherited from class Godot::Object

==(other : Godot::Object) : Bool
==(other : Nil) : Bool
==
, _godot_call_tool_button(button_name : String) : Void _godot_call_tool_button, _godot_call_virtual(method_name : String, delta : Float64) : Void _godot_call_virtual, _godot_call_virtual_with_data(method_name : String, args : Pointer(Pointer(Void)), ret : Pointer(Void)) : Void _godot_call_virtual_with_data, _godot_get_property(prop_name : String, ret_ptr : Pointer(Void)) : Void _godot_get_property, _godot_set_property(prop_name : String, val_ptr : Pointer(Void)) : Void _godot_set_property, add_user_signal(signal : String, arguments : Godot::Array) : Void add_user_signal, alive? : Bool alive?, await_signal(signal_name : String, timeout_sec : Float64 | Nil = nil) : Array(Variant) await_signal, call(method : String, *args) : Pointer(Void) call, call_bool(method : String, *args) : Bool call_bool, call_deferred(method : String, *args) : Pointer(Void) call_deferred, call_f64(method : String, *args) : Float64 call_f64, call_i64(method : String, *args) : Int64 call_i64, call_obj(method : String, *args) : Node | Nil call_obj, call_obj_as(type : T.class, method : String, *args) : T | Nil forall T call_obj_as, call_str(method : String, *args) : String call_str, callv(method : String, arg_array : Godot::Array) : Pointer(Void) callv, can_translate_messages : Bool can_translate_messages, cancel_free : Void cancel_free, check_alive! : Void check_alive!, connect(signal_name : String, flags : Godot::ConnectFlags = ::Godot::ConnectFlags::None, callback : Proc(Array(Variant), Void) | Nil = nil) : SignalSubscription
connect(signal_name : String, flags : Godot::ConnectFlags = ::Godot::ConnectFlags::None, &block : Array(Variant) -> Void) : SignalSubscription
connect(signal_name : String, listener_target : Godot::Object, method_name : Symbol, flags : Godot::ConnectFlags = ::Godot::ConnectFlags::None) : SignalSubscription
connect(signal : String, callable : Pointer(Void), flags : Int64) : Int64
connect
, connect_one_shot(signal_name : String, &block : Array(Variant) -> Void) : SignalSubscription connect_one_shot, destroy : Void destroy, destroyed? : Bool destroyed?, disconnect(signal : String, callable : Pointer(Void)) : Void
disconnect(signal_name : String) : Void
disconnect
, editor_hint? : Bool editor_hint?, emit_signal(name : String) : Void
emit_signal(name : String, *args) : Void
emit_signal
, free : Void free, get(property : String) : Pointer(Void) get, get_class : String get_class, get_incoming_connections : Godot::Array get_incoming_connections, get_indexed(property_path : NodePath) : Pointer(Void) get_indexed, get_instance_id : Int64 get_instance_id, get_meta(name : String, default : Pointer(Void)) : Pointer(Void) get_meta, get_meta_list : Godot::Array get_meta_list, get_method_argument_count(method : String) : Int64 get_method_argument_count, get_method_list : Godot::Array get_method_list, get_property_list : Godot::Array get_property_list, get_script : Pointer(Void) get_script, get_signal_connection_list(signal : String) : Godot::Array get_signal_connection_list, get_signal_list : Godot::Array get_signal_list, get_translation_domain : String get_translation_domain, has_connections(signal : String) : Bool has_connections, has_meta(name : String) : Bool has_meta, has_method(method : String) : Bool has_method, has_signal(signal : String) : Bool has_signal, has_signal?(signal_name : String) : Bool has_signal?, has_user_signal(signal : String) : Bool has_user_signal, hash(hasher) hash, if_alive : self | Nil if_alive, instance_id : UInt64 instance_id, is_blocking_signals : Bool is_blocking_signals, is_class(godot_class : String) : Bool is_class, is_connected(signal : String, callable : Pointer(Void)) : Bool is_connected, is_queued_for_deletion : Bool is_queued_for_deletion, is_valid? : Bool is_valid?, link_class_script : Void link_class_script, notification(what : Int64, reversed : Bool) : Void notification, notify_property_list_changed : Void notify_property_list_changed, pointer : Pointer(Void) pointer, pointer=(val : Pointer(Void)) pointer=, print(*args) print, printerr(*args) printerr, property_can_revert(property : String) : Bool property_can_revert, property_get_revert(property : String) : Pointer(Void) property_get_revert, puts(*args) puts, remove_meta(name : String) : Void remove_meta, remove_user_signal(signal : String) : Void remove_user_signal, set(property : String, value : Pointer(Void)) : Void set, set_block_signals(enable : Bool) : Void set_block_signals, set_deferred(property : String, value : Pointer(Void)) : Void set_deferred, set_indexed(property_path : NodePath, value : Pointer(Void)) : Void set_indexed, set_message_translation(enable : Bool) : Void set_message_translation, set_meta(name : String, value : Pointer(Void)) : Void set_meta, set_script(script : Pointer(Void)) : Void set_script, set_translation_domain(domain : String) : Void set_translation_domain, signal(name : String) : Godot::BoundSignal signal, signal_connection_count(signal_name : String) : Int32 signal_connection_count, signal_target_id : UInt64 signal_target_id, to_s(io : IO) : Void to_s, to_string : String to_string, to_unsafe : Pointer(Void) to_unsafe, tr(message : String, context : String) : String tr, tr_n(message : String, plural_message : String, n : Int64, context : String) : String tr_n

Constructor methods inherited from class Godot::Object

new(pointer : Pointer(Void) = Pointer(Void).null) new

Class methods inherited from class Godot::Object

_godot_has_virtual_method(method_name : String) : Bool _godot_has_virtual_method, is_instance_id_valid(id : Int | UInt64) : Bool is_instance_id_valid

Constructor Detail

def self.new(pointer : Pointer(Void) = Pointer(Void).null) #

[View source]

Instance Method Detail

def auto_accept_quit #

Property #auto_accept_quit getter


[View source]
def auto_accept_quit=(val) #

Property #auto_accept_quit setter


[View source]
def auto_accept_quit? #

[View source]
def change_scene_to_file(path : String) : Int64 #

[View source]
def change_scene_to_node(node : Node) : Int64 #

[View source]
def change_scene_to_packed(packed_scene : PackedScene) : Int64 #

[View source]
def create_timer(time_sec : Float64, process_always : Bool, process_in_physics : Bool, ignore_time_scale : Bool) : SceneTreeTimer #

[View source]
def create_timer(time_sec : Number, process_always : Bool = true, process_in_physics : Bool = false, ignore_time_scale : Bool = false) : SceneTreeTimer #

Creates a SceneTreeTimer with default arguments matching GDScript ergonomics


[View source]
def create_tween : Tween #

[View source]
def current_scene : Node #

[View source]
def current_scene=(current_scene : Node) #

[View source]
def debug_collisions_hint #

Property #debug_collisions_hint getter


[View source]
def debug_collisions_hint=(val) #

Property #debug_collisions_hint setter


[View source]
def debug_collisions_hint? #

[View source]
def debug_navigation_hint #

Property #debug_navigation_hint getter


[View source]
def debug_navigation_hint=(val) #

Property #debug_navigation_hint setter


[View source]
def debug_navigation_hint? #

[View source]
def debug_paths_hint #

Property #debug_paths_hint getter


[View source]
def debug_paths_hint=(val) #

Property #debug_paths_hint setter


[View source]
def debug_paths_hint? #

[View source]
def edited_scene_root #

Property #edited_scene_root getter


[View source]
def edited_scene_root=(val) #

Property #edited_scene_root setter


[View source]
def get_current_scene : Node #

[View source]
def get_edited_scene_root : Node #

[View source]
def get_first_node_in_group(group : String) : Node #

[View source]
def get_first_node_in_group_as(type : T.class, group_name : String) : T | Nil forall T #

[View source]
def get_frame : Int64 #

[View source]
def get_multiplayer(for_path : NodePath) : MultiplayerAPI #

[View source]
def get_node_count : Int64 #

[View source]
def get_node_count_in_group(group : String) : Int64 #

[View source]
def get_nodes_in_group(group : String) : Godot::Array #

[View source]
def get_processed_tweens : Godot::Array #

[View source]
def get_root : Window #

[View source]
def has_group(name : String) : Bool #

[View source]
def is_accessibility_enabled : Bool #

[View source]
def is_accessibility_supported : Bool #

[View source]
def is_auto_accept_quit : Bool #

[View source]
def is_debugging_collisions_hint : Bool #

[View source]
def is_debugging_navigation_hint : Bool #

[View source]
def is_debugging_paths_hint : Bool #

[View source]
def is_multiplayer_poll_enabled : Bool #

[View source]
def is_paused : Bool #

[View source]
def is_physics_interpolation_enabled : Bool #

[View source]
def is_quit_on_go_back : Bool #

[View source]
def multiplayer_poll #

Property #multiplayer_poll getter


[View source]
def multiplayer_poll=(val) #

Property #multiplayer_poll setter


[View source]
def multiplayer_poll? #

[View source]
def notify_group(group : String, notification : Int64) : Void #

[View source]
def notify_group_flags(call_flags : Int64, group : String, notification : Int64) : Void #

[View source]
def paused #

Property #paused getter


[View source]
def paused=(val) #

Property #paused setter


[View source]
def paused? #

[View source]
def physics_interpolation #

Property #physics_interpolation getter


[View source]
def physics_interpolation=(val) #

Property #physics_interpolation setter


[View source]
def physics_interpolation? #

[View source]
def queue_delete(obj : Godot::Object) : Void #

[View source]
def quit(exit_code : Int64) : Void #

[View source]
def quit_on_go_back #

Property #quit_on_go_back getter


[View source]
def quit_on_go_back=(val) #

Property #quit_on_go_back setter


[View source]
def quit_on_go_back? #

[View source]
def reload_current_scene : Int64 #

[View source]
def root : Node #

[View source]
def root=(root : Node) #

[View source]
def set_auto_accept_quit(enabled : Bool) : Void #

[View source]
def set_current_scene(child_node : Node) : Void #

[View source]
def set_debug_collisions_hint(enable : Bool) : Void #

[View source]
def set_debug_navigation_hint(enable : Bool) : Void #

[View source]
def set_debug_paths_hint(enable : Bool) : Void #

[View source]
def set_edited_scene_root(scene : Node) : Void #

[View source]
def set_group(group : String, property : String, value : Pointer(Void)) : Void #

[View source]
def set_group_flags(call_flags : Int64, group : String, property : String, value : Pointer(Void)) : Void #

[View source]
def set_multiplayer(multiplayer : MultiplayerAPI, root_path : NodePath) : Void #

[View source]
def set_multiplayer_poll_enabled(enabled : Bool) : Void #

[View source]
def set_pause(enable : Bool) : Void #

[View source]
def set_physics_interpolation_enabled(enabled : Bool) : Void #

[View source]
def set_quit_on_go_back(enabled : Bool) : Void #

[View source]
def unload_current_scene : Void #

[View source]