private void OnTriggerEnter2D(Collider2D collision) { int count = 0; if (collision.gameObject.CompareTag("PlayerBullet")) { GameObject particle = Instantiate(particleSystem, collision.gameObject.transform.position, Quaternion.identity); Destroy(particle, 3f); count++; collision.gameObject.SetActive(false); if (count == 1) { LevelbarUpdate(); ScoreControl.updateScoreui(); } damageHealth(); } }
private void levelpanelControl() //for changing the level bar and score controll { leveLCompletion.UpdateLevelbarBigEnemy(damageamount.getHelthdamage()); //calling another method when bigenemi is called ScoreControl.updateScoreui(); }