private void OnCollisionEnter2D(Collision2D collision) { if (collision.gameObject.CompareTag("Player") && !isOne) { isOne = true; MessageSystemPlayingScene.Player.GetComponent <Animator>().SetBool("IsDeath", true); MessageSystemPlayingScene.GeneralyPartOfDeath(); robDead.Death(); } if (collision.gameObject.CompareTag("Hit") && !isOne) { isOne = true; robDead.Death(); } }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.CompareTag("Player") && !robotScript.IsOne) { robotScript.IsOne = true; robDead.Death(); MessageSystemPlayingScene.Player.GetComponent <Animator>().SetBool("IsDeath", true); MessageSystemPlayingScene.GeneralyPartOfDeath(); } }
public void RobotDeathAfterEvaStrike() { robDead.Death(); }