浏览代码

Move visor with mouse

DricomDragon 3 年之前
父节点
当前提交
4f34199feb
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      godot/scripts/Launcher.gd

+ 2 - 0
godot/scripts/Launcher.gd

@@ -32,6 +32,8 @@ func _ready():
 func _input(event):
 	if event is InputEventMouseButton and event.is_pressed() :
 		trigger(event.position)
+	elif event is InputEventMouseMotion and current_state == State.READY:
+		target.position = event.position
 
 
 func trigger(aim:Vector2):