質問編集履歴
2
コード内にself.addChild(引数)を追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -39,11 +39,13 @@
|
|
39
39
|
let luigi = SKSpriteNode(imageNamed: "luigi")
|
40
40
|
luigi.physicsBody?.categoryBitMask = ColliderType.Brother // 自分のカテゴリをBrotherに設定
|
41
41
|
luigi.physicsBody?.contactTestBitMask = ColliderType.Enemy // Enemyカテゴリと接触したときにdidBeginContact()などが発火
|
42
|
+
self.addChild(luigi)
|
42
43
|
|
43
44
|
// ワリオ(細かい設定は省略してます)
|
44
45
|
let wario = SKSpriteNode(imageNamed: "wario")
|
45
46
|
wario.physicsBody?.categoryBitMask = ColliderType.Enemy // 自分のカテゴリをEnemyにする
|
46
47
|
wario.physicsBody?.contactTestBitMask = CollinderType.Player | ColliderType.Brother // Player or Brotherカテゴリを接触したときにdidBeginContact()などが発火
|
48
|
+
self.addChild(wario)
|
47
49
|
```
|
48
50
|
|
49
51
|
### 質問
|
1
tagを修正
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|