您当前的位置: 首页 >  开发游戏的老王

SceneTree类

开发游戏的老王 发布时间:2019-10-21 10:05:11 ,浏览量:5

Godot Engine 3.2 Alpha2

SceneTree继承于MainLoop,注意:SceneTree本身并不是Node,它通过节点树管理游戏主循环。

常用属性
类型属性名说明
Nodecurrent_scene当前场景
booldebug_collisions_hint
booldebug_navigation_hint
Nodeedited_scene_root
MultiplayerAPImultiplayer
boolmultiplayer_poll
NetworkedMultiplayerPeernetwork_peer
boolpaused主循环开关,即控制2D/3D物理系统以及_process/_physics_process/_input的开关
boolrefuse_new_network_connections
ViewportrootViewport类型,它是场景树的根视口,并且它本身就是一个只读属性
booluse_font_oversampling
常用方法
类型方法名说明
Variantcall_group ( String group, String method, … ) vararg
Variantcall_group_flags ( int flags, String group, String method, … ) vararg
Errorchange_scene ( String path )跳转Scene,参数为path
Errorchange_scene_to ( PackedScene packed_scene )跳转Scene,参数为场景资源
SceneTreeTimercreate_timer ( float time_sec, bool pause_mode_process=true )
intget_frame ( ) const
PoolIntArrayget_network_connected_peers ( ) const
intget_network_unique_id ( ) const
intget_node_count ( ) const
Arrayget_nodes_in_group ( String group )
intget_rpc_sender_id ( ) const
boolhas_group ( String name ) const
boolhas_network_peer ( ) const
boolis_input_handled ( )
boolis_network_server ( ) const
voidnotify_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 )
关注
打赏
查看更多评论

开发游戏的老王

暂无认证

  • 5浏览

    0关注

    326博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文
立即登录/注册

微信扫码登录