void OnTriggerEnter2D(Collider2D trigger) { EnemyShot laserHit = trigger.GetComponent <EnemyShot> (); if (laserHit) { TakeDamage(laserHit.getDamage()); laserHit.killMe(); } }