質問編集履歴
3
マークダウン気泡
test
CHANGED
File without changes
|
test
CHANGED
@@ -26,7 +26,7 @@
|
|
26
26
|
|
27
27
|
|
28
28
|
|
29
|
-
|
29
|
+
```c#
|
30
30
|
|
31
31
|
using System.Collections;
|
32
32
|
|
@@ -90,7 +90,7 @@
|
|
90
90
|
|
91
91
|
}
|
92
92
|
|
93
|
-
|
93
|
+
```
|
94
94
|
|
95
95
|
|
96
96
|
|
2
書き方の間違い
test
CHANGED
File without changes
|
test
CHANGED
@@ -26,9 +26,7 @@
|
|
26
26
|
|
27
27
|
|
28
28
|
|
29
|
-
c#
|
29
|
+
~~~c#
|
30
|
-
|
31
|
-
---
|
32
30
|
|
33
31
|
using System.Collections;
|
34
32
|
|
@@ -92,7 +90,7 @@
|
|
92
90
|
|
93
91
|
}
|
94
92
|
|
95
|
-
|
93
|
+
~~~
|
96
94
|
|
97
95
|
|
98
96
|
|
1
ソースコード
test
CHANGED
File without changes
|
test
CHANGED
@@ -28,6 +28,72 @@
|
|
28
28
|
|
29
29
|
c#
|
30
30
|
|
31
|
+
---
|
32
|
+
|
33
|
+
using System.Collections;
|
34
|
+
|
35
|
+
using System.Collections.Generic;
|
36
|
+
|
37
|
+
using UnityEngine;
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
public class BulletController : MonoBehaviour
|
42
|
+
|
43
|
+
{
|
44
|
+
|
45
|
+
public ParticleSystem m_particleSystem;
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
// Use this for initialization
|
50
|
+
|
51
|
+
void Start ()
|
52
|
+
|
53
|
+
{
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
}
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
void Update()
|
62
|
+
|
63
|
+
{
|
64
|
+
|
65
|
+
transform.Translate(0, 0.2f, 0);
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
if (transform.position.y > 5)
|
70
|
+
|
71
|
+
{
|
72
|
+
|
73
|
+
Destroy(gameObject);
|
74
|
+
|
75
|
+
}
|
76
|
+
|
77
|
+
}
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
void OnTriggerEnter2D(Collider2D coll)
|
82
|
+
|
83
|
+
{
|
84
|
+
|
85
|
+
m_particleSystem.Play();
|
86
|
+
|
87
|
+
Destroy(coll.gameObject);
|
88
|
+
|
89
|
+
Destroy(gameObject);
|
90
|
+
|
91
|
+
}
|
92
|
+
|
93
|
+
}
|
94
|
+
|
95
|
+
---
|
96
|
+
|
31
97
|
|
32
98
|
|
33
99
|
### 試したこと
|