// Update is called once per frame void Update() { bossBH = enemyBossBHObject.GetComponent <enemyBossBH>(); if (atackJudgmentFlag == true) { judgmentTime += Time.deltaTime; if (judgmentTime > judgmentTimeMax) { atackJudgmentFlag = false; judgmentTime = 0; } } }
// Update is called once per frame void Update() { enemyBossBH = BossBHObject.GetComponent <enemyBossBH>(); atackFlag = enemyBossBH.atackFlag; if (atackFlag == true) { GetComponent <BoxCollider>().enabled = true; } else { GetComponent <BoxCollider>().enabled = false; } }