private void OnTriggerExit2D(Collider2D other) { EN enemy = other.GetComponent <EN>(); if (enemy != null) { enemy.DamageSpriteF(false); } }
private void OnTriggerStay2D(Collider2D other) { EN enemy = other.GetComponent <EN>(); if (enemy != null && !canDoDamage) { enemy.TakeDamage(10); enemy.DamageSpriteF(true); } }