Example #1
0
    /// <summary>
    /// Activate this object hitbox.
    /// </summary>
    /// <param name="_bonusDamages">Bonus damages of the attack.</param>
    protected virtual void ActivateHitbox(int _bonusDamages)
    {
        if (hitBox.IsActive)
        {
            hitBox.Desactivate();
        }

        Tags _hitableTags = owner.HitBox.HittableTags;

        if (owner is TDS_Enemy)
        {
            _hitableTags.AddTag("Enemy");
        }
        hitBox.BonusDamages = bonusDamage + _bonusDamages;
        hitBox.Activate(attack, owner, _hitableTags.ObjectTags);
    }
 /// <summary>
 /// Destroy the gameObject
 /// </summary>
 private void CallDestruction()
 {
     if (!PhotonNetwork.isMasterClient)
     {
         return;
     }
     StopAllCoroutines();
     hitBox.Desactivate();
     TDS_VFXManager.Instance.SpawnEffect(FXType.MagicDisappear, transform.position);
     PhotonNetwork.Destroy(gameObject);
 }
Example #3
0
 /// <summary>
 /// Stop or ends the current attack of the character.
 /// </summary>
 public virtual void StopAttack()
 {
     IsAttacking = false;
     hitBox.Desactivate();
 }
 /// <summary>
 /// Make the fire ball explode.
 /// </summary>
 private void Explode()
 {
     hitBox.Desactivate();
     animator.SetTrigger("Explosion");
 }