Godot Engine 3.2 Alpha2
SceneTree
继承于MainLoop
,注意:SceneTree
本身并不是Node
,它通过节点树管理游戏主循环。
_process
/_physics_process
/_input
的开关boolrefuse_new_network_connectionsViewportrootViewport
类型,它是场景树的根视口,并且它本身就是一个只读属性booluse_font_oversampling
常用方法
类型方法名说明Variantcall_group ( String group, String method, … ) varargVariantcall_group_flags ( int flags, String group, String method, … ) varargErrorchange_scene ( String path )跳转Scene
,参数为path
Errorchange_scene_to ( PackedScene packed_scene )跳转Scene
,参数为场景资源SceneTreeTimercreate_timer ( float time_sec, bool pause_mode_process=true )intget_frame ( ) constPoolIntArrayget_network_connected_peers ( ) constintget_network_unique_id ( ) constintget_node_count ( ) constArrayget_nodes_in_group ( String group )intget_rpc_sender_id ( ) constboolhas_group ( String name ) constboolhas_network_peer ( ) constboolis_input_handled ( )boolis_network_server ( ) constvoidnotify_group ( String group, int notification )voidnotify_group_flags ( int call_flags, String group, int notification )voidqueue_delete ( Object obj )voidquit ( )退出程序Errorreload_current_scene ( )voidset_auto_accept_quit ( bool enabled )voidset_group ( String group, String property, Variant value )voidset_group_flags ( int call_flags, String group, String property, Variant value )voidset_input_as_handled ( )voidset_quit_on_go_back ( bool enabled )voidset_screen_stretch ( StretchMode mode, StretchAspect aspect, Vector2 minsize, float shrink=1 )