void OnTriggerStay2D(Collider2D coll) { if (coll.gameObject.tag == "Batas" || coll.gameObject.tag == "Ground") { Destroy(gameObject); } if (coll.gameObject.layer == LayerMask.NameToLayer("Enemy")) { Destroy(gameObject); if (coll.gameObject.tag == "Enemy") { EnemyHealth hurtenemy = coll.gameObject.GetComponent <EnemyHealth>(); hurtenemy.DiDor(damagesenjata); } } }