private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.tag == "Player") { //Destroy(collision.gameObject); //player = GameObject.Find("Player").GetComponent<Player_Script>(); gameplay.PlayerDied(); } }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.tag == "Player") { Destroy(collision.gameObject); gameplay.PlayerDied(); } }
private void OnCollisionEnter2D(Collision2D collision) { if (collision.gameObject.tag == "Player") { Destroy(collision.gameObject); Destroy(gameObject); gameplay.PlayerDied(); } if (collision.gameObject.tag == "Ground") { Destroy(gameObject); } }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.tag == "Player") { //Destroy(collision.gameObject); gameplay.PlayerDied(); } if (collision.gameObject.tag == "Ground") { myanim.SetBool("spider_jumper_attack", false); } }
void OnCollisionEnter2D(Collision2D col) { gameplay.PlayerDied(); }