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(); } }
void OnEnable() { g_HPGauge.GetComponent <Image>().fillAmount = 1.0f; //ゲージ回復処理 g_HP.Increase(600.0f, 600.0f); //HP回復処理 }