Jelajahi Sumber

-Rewritten KinematicBody2D::move to MUCH more efficient code.
-KinematicBody2D::move now properly recognizes collision exceptions and masks, fixes #1649
-Removed object type masking for KinematicBody2D
-Added a test_motion() function to RigidBody2D, allowing simlar behavior to KinematicBody2D::move there.

Juan Linietsky 10 tahun lalu
induk
melakukan
0209464d65
2 mengubah file dengan 2 tambahan dan 1 penghapusan
  1. 2 1
      2d/kinematic_char/colworld.gd
  2. TEMPAT SAMPAH
      2d/kinematic_char/colworld.scn

+ 2 - 1
2d/kinematic_char/colworld.gd

@@ -14,4 +14,5 @@ func _ready():
 
 func _on_princess_body_enter( body ):
 	#the name of this editor-generated callback is unfortunate
-	get_node("youwin").show()
+	if (body.get_name()=="player"):
+		get_node("youwin").show()

TEMPAT SAMPAH
2d/kinematic_char/colworld.scn