/// <summary> /// Activates the hit box. /// When activated, produces the effect of the given attack to any <see cref="TDS_Damageable"/> in <see cref="collider"/> zone whose layer is in <see cref="WhatHit"/>. /// </summary> /// <param name="_attack">Attack used to hit what is in the hit box.</param> /// <param name="_owner">The person who attack.</param> /// <param name="_hittableTags">Tags to hit.</param> public void Activate(TDS_Attack _attack, TDS_Character _owner, Tag[] _hittableTags) { Owner = _owner; HittableTags.ObjectTags = _hittableTags; Activate(_attack); }
/// <summary> /// Activates the hit box. /// When activated, produces the effect of the given attack to any <see cref="TDS_Damageable"/> in <see cref="collider"/> zone whose layer is in <see cref="WhatHit"/>. /// </summary> /// <param name="_attack">Attack used to hit what is in the hit box.</param> public void Activate(TDS_Attack _attack) { if (!PhotonNetwork.isMasterClient) { return; } // If the given attack is null, send the information in the console // and return before activating the hit box. if (_attack == null) { Debug.LogWarning("The given attack to activate " + Owner.name + "'s hit box is null ! Activation is canceled."); return; } CurrentAttack = _attack; collider.enabled = true; IsActive = true; OnStartAttack?.Invoke(_attack); }
/// <summary> /// Activates the hit box. /// When activated, produces the effect of the given attack to any <see cref="TDS_Damageable"/> in <see cref="collider"/> zone whose layer is in <see cref="WhatHit"/>. /// </summary> /// <param name="_attack">Attack used to hit what is in the hit box.</param> /// <param name="_owner">The person who attack.</param> public void Activate(TDS_Attack _attack, TDS_Character _owner) { Owner = _owner; Activate(_attack); }