void Impacted(BaseHitImpact other_hit, BaseHitData impact_hit_data) { // Stopping Time GoWCommon.StopTime(); // Visual FX Vector3 hit_position = other_hit.transform.position; Vector3 ennemy_position = other_hit.holder.transform.position; Transform ennemy_transform = other_hit.holder.transform; GameObject p = Instantiate(ImpactEffect, hit_position, ImpactEffect.transform.rotation) as GameObject; // Physical response and animation holder.Impacted(ennemy_transform, impact_hit_data); }
void OnTriggerEnter(Collider other) { if (TypeImpact == 0) { BaseHitImpact other_hit = other.gameObject.GetComponent <BaseHitImpact>(); if (other_hit != null) { if (other_hit.TypeImpact == 1) { if (other_hit.Active) { Impacted(other_hit, other_hit.current_hit_data); } } } } }