teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

より細かくした

2019/03/12 14:14

投稿

easan
easan

スコア12

title CHANGED
File without changes
body CHANGED
@@ -8,10 +8,14 @@
8
8
  {
9
9
  if (Input.GetKey(KeyCode.K))
10
10
  {
11
+ Debug.Log("hit");
12
+ if(other.tag == ("enemy"))
13
+ {
11
- Debug.Log("damage");
14
+ Debug.Log("damage");
15
+ Destroy (other.gameObject) ;
16
+ }
12
17
  }
13
- }
14
- ```ここに言語名を入力
18
+ }```ここに言語名を入力
15
19
  c#
16
20
  ```
17
21