update godot start demo to 4.x

pull/3/head
godotg 2023-11-26 12:28:28 +08:00
parent 8ec206154b
commit 62281159c2
4 changed files with 4 additions and 1 deletions

View File

@ -56,6 +56,7 @@ func _process(delta):
pass pass
``` ```
- ThreadGroup属性可以在子节点多线程操作属性
- https://github.com/godotengine/godot-proposals/issues/6424 - https://github.com/godotengine/godot-proposals/issues/6424

View File

@ -26,9 +26,11 @@ func _process(delta):
#$NodeChild.position = Vector2.ZERO #$NodeChild.position = Vector2.ZERO
#get_parent().position = Vector2.ZERO #get_parent().position = Vector2.ZERO
#self.call_deferred("myCall") #self.call_deferred("myCall")
#self.call_deferred_thread_group("myCall")
pass pass
func myCall(): func myCall():
print("my call")
get_parent().position = Vector2.ZERO get_parent().position = Vector2.ZERO
pass pass

View File

@ -3,7 +3,7 @@
[ext_resource type="Script" path="res://scene/demo04_signal/script/signal.gd" id="1_dadg8"] [ext_resource type="Script" path="res://scene/demo04_signal/script/signal.gd" id="1_dadg8"]
[ext_resource type="Script" path="res://scene/demo04_signal/script/mySignal.gd" id="2_lvqsi"] [ext_resource type="Script" path="res://scene/demo04_signal/script/mySignal.gd" id="2_lvqsi"]
[ext_resource type="Script" path="res://scene/demo04_signal/script/await.gd" id="3_4hptw"] [ext_resource type="Script" path="res://scene/demo04_signal/script/await.gd" id="3_4hptw"]
[ext_resource type="Script" path="res://scene/demo04_signal/thread.gd" id="4_r6xio"] [ext_resource type="Script" path="res://scene/demo04_signal/script/thread.gd" id="4_r6xio"]
[node name="Node2D" type="Node2D"] [node name="Node2D" type="Node2D"]
script = ExtResource("1_dadg8") script = ExtResource("1_dadg8")