Exemple #1
0
 private void DoBombDamage(EntityHealth enemy, int damage)
 {
     enemy.TakeDamage(damage, IDofLastHit);
     if (enemy.GetHealth() - damage <= 0)
     {
         EventController.FireEvent(new TrackSuperlativeMessage(SuperlativeController.Superlative.HailMary,
                                                               SuperlativeController.ConditionFlag.identity, Vector3.Distance(transform.position, GetComponent <BallRetrieval>().GetLastPos()),
                                                               GetLastShotId()));
     }
 }
Exemple #2
0
    public override void TriggerAbilityPlayer(Collider other)
    {
        EntityHealth enemy = other.gameObject.GetComponent <EntityHealth>();

        if (enemy)
        {
            enemy.TakeDamage(damage, IDofLastHit);
            if (enemy.GetHealth() - damage <= 0)
            {
                EventController.FireEvent(new TrackSuperlativeMessage(SuperlativeController.Superlative.HailMary,
                                                                      SuperlativeController.ConditionFlag.identity, Vector3.Distance(transform.position, GetComponent <BallRetrieval>().GetLastPos()),
                                                                      GetLastShotId()));
            }
        }

        base.TriggerAbility();
    }