回答編集履歴

1

SKPhysicsBody(texture:size:)

2018/05/08 03:10

投稿

fuzzball
fuzzball

スコア16731

test CHANGED
@@ -1,7 +1,13 @@
1
- コードと画像コピってそのまま使ました
1
+ `SKPhysicsBody(texture:size:)`使って下さい。
2
2
 
3
3
 
4
4
 
5
+ ```swift
5
6
 
7
+ if let texture = block1SpriteAppear.texture {
6
8
 
7
- ![human1](a36dfa7b7e88975c25991d58ef65f907.png)
9
+ block1SpriteAppear.physicsBody = SKPhysicsBody(texture: texture, size: block1SpriteAppear.size)
10
+
11
+ }
12
+
13
+ ```