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

質問編集履歴

1

書式の改善

2021/05/20 11:35

投稿

poyo123
poyo123

スコア4

title CHANGED
File without changes
body CHANGED
@@ -11,25 +11,25 @@
11
11
  ### 該当のソースコード
12
12
 
13
13
  ```
14
- using System.Collections;
14
+ 1 using System.Collections;
15
- using System.Collections.Generic;
15
+ 2 using System.Collections.Generic;
16
- using UnityEngine;
16
+ 3 using UnityEngine;
17
- using UnityEngine.UI; //UIを使うので忘れず追加
17
+ 4 using UnityEngine.UI; //UIを使うので忘れず追加
18
+ 5
19
+ 6 public class GameDirector : MonoBehaviour
20
+ 7 {
21
+ 8 GameObject hpGauge;
22
+ 9
23
+ 10 void Start()
24
+ 11 {
25
+ 12 this.hpGause = GameObject.Find("hpGauge");
26
+ 13 }
27
+ 14
28
+ 15 public void DecreaseHp()
29
+ 16 {
30
+ 17 this.hpGauge.GetComponent<Image>().fillAmount -= 0.1f;
31
+ 18 }
32
+ 19
33
+ 20 }
18
34
 
19
- public class GameDirector : MonoBehaviour
20
- {
21
- GameObject hpGauge;
22
-
23
- void Start()
24
- {
25
- this.hpGause = GameObject.Find("hpGauge");
26
- }
27
-
28
- public void DecreaseHp()
29
- {
30
- this.hpGauge.GetComponent<Image>().fillAmount -= 0.1f;
31
- }
32
-
33
- }
34
-
35
35
  ```