回答編集履歴

1

編集途中で回答してしまったので。

2018/12/13 01:04

投稿

ha1f
ha1f

スコア83

test CHANGED
@@ -1,7 +1,17 @@
1
1
  ```swift
2
+
3
+ let touch = touches.first!
2
4
 
3
5
  let touchPoint = touch.location(in: self)
4
6
 
5
7
  player.position = CGPoint(x: touchPoint.x, y: touchPoint.y - 30)
6
8
 
7
9
  ```
10
+
11
+
12
+
13
+ 上に移動させるなら、こんな感じですかね?
14
+
15
+
16
+
17
+ 補足ですが、指の移動量をとってそれに応じて動かすほうが一般的な気もします、ワープしないように。