Ejemplo n.º 1
0
    void Impacted(GoWHitImpact other_hit, HitData 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);
    }
Ejemplo n.º 2
0
 void OnTriggerEnter(Collider other)
 {
     if (TypeImpact == 0)
     {
         GoWHitImpact other_hit = other.gameObject.GetComponent <GoWHitImpact>();
         if (other_hit != null)
         {
             if (other_hit.TypeImpact == 1)
             {
                 if (other_hit.Active)
                 {
                     Impacted(other_hit, other_hit.current_hit_data);
                 }
             }
         }
     }
 }