예제 #1
0
    private void OnTriggerExit2D(Collider2D other)
    {
        EN enemy = other.GetComponent <EN>();

        if (enemy != null)
        {
            enemy.DamageSpriteF(false);
        }
    }
예제 #2
0
    private void OnTriggerStay2D(Collider2D other)
    {
        EN enemy = other.GetComponent <EN>();

        if (enemy != null && !canDoDamage)
        {
            enemy.TakeDamage(10);
            enemy.DamageSpriteF(true);
        }
    }