瀏覽代碼

2d movement click cs StringName

Co-authored-by: A Thousand Ships <[email protected]>
HubbleCommand 1 年之前
父節點
當前提交
59de1556d2
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tutorials/2d/2d_movement.rst

+ 1 - 1
tutorials/2d/2d_movement.rst

@@ -232,7 +232,7 @@ on the screen will cause the player to move to the target location.
 
 
     func _input(event):
     func _input(event):
         # Use is_action_pressed to only accept single taps as input instead of mouse drags.
         # Use is_action_pressed to only accept single taps as input instead of mouse drags.
-        if event.is_action_pressed("click"):
+        if event.is_action_pressed(&"click"):
             target = get_global_mouse_position()
             target = get_global_mouse_position()
 
 
     func _physics_process(delta):
     func _physics_process(delta):