private void OnTriggerEnter2D(Collider2D collider2D) { if (collider2D.gameObject.layer == Globals.BIPED_LAYER) { Biped biped = collider2D.gameObject.GetComponent <Biped>(); biped.Die(); } }
private bool TryAffectBiped(Collision2D collision2D) { if (collision2D.gameObject.layer == Globals.BIPED_LAYER) { Biped biped = collision2D.gameObject.GetComponent <Biped>(); biped.Die(); return(false); } return(true); }