예제 #1
0
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.LeftArrow))
     {
         hp.Decrease(1);
         hp.Commit();
     }
     if (Input.GetKeyDown(KeyCode.RightArrow))
     {
         hp.Increase(1);
         hp.Commit();
     }
     if (Input.GetKeyDown(KeyCode.X))
     {
         DoWeirdStuff();
     }
 }
예제 #2
0
 void OnEnable()
 {
     g_HPGauge.GetComponent <Image>().fillAmount = 1.0f; //ゲージ回復処理
     g_HP.Increase(600.0f, 600.0f);                      //HP回復処理
 }