public void TakeDamage(int damage) { m_nHP -= damage; BossHpPointBar.OnAddPoint(-damage); Debug.Log("Current HP : " + m_nHP); DeathCheck(m_nHP); }
private void OnEnable() { BallObject = null; InitPatterns(); InitCoolTime(); //BossHpPointBar.OnSetPoint(m_nHP); BossHpPointBar.InitalizeAll?.Invoke(); int offset = 8 - m_nHP; for (int i = 0; i < offset; i++) { BossHpPointBar.OnAddPoint(-1); } brickGenerator = FindObjectOfType <BrickGenerator>(); StartCoroutine(EBossLoop()); StartCoroutine(BallDelay()); }
public void AppendHP(int hp) { m_nHP += hp; BossHpPointBar.OnAddPoint(hp); DeathCheck(m_nHP); }