소스 검색

Move visor with mouse

DricomDragon 4 년 전
부모
커밋
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):