Esempio n. 1
0
    void CollisionWithParticle(Collider other)
    {
        NierHitbox other_hb = other.GetComponent <NierHitbox>();

        if (other_hb != null)
        {
            if (other_hb.Type == NierHitbox.BoxType.hurt)
            {
                Vector3 normalized_direction = (other_hb.gameObject.transform.position - transform.position).normalized;
                current_hit_data = GetComponent <ProjectileBasic>().HitInfo;
                other_hb.Impacted(current_hit_data, normalized_direction);
            }
        }
        Destroy(transform.root.gameObject);
        CreateEffect(transform.position);
    }
Esempio n. 2
0
    void CollisionWithHitbox(Collider other)
    {
        if (Active)
        {
            NierHitbox other_hb = other.GetComponent <NierHitbox>();

            if (other_hb != null)
            {
                if (other_hb.Type == NierHitbox.BoxType.hurt)
                {
                    Vector3 normalized_direction = (other_hb.gameObject.transform.position - transform.position).normalized;
                    other_hb.Impacted(current_hit_data, normalized_direction);
                    CreateEffect(transform.position);
                }
            }
        }
    }