private void OnTriggerEnter2D(Collider2D collision) { if (weaponNow1 == null) { if (collision.CompareTag("Enemie")) { AudioClip clipHit = repository.GetRepository().clipPuchHit; repository.GetAudioSource().PlayOneShot(clipHit); attributes atb = collision.GetComponentInParent <attributes>(); Vector2 force = Quaternion.Euler(Vector3.forward * transform.eulerAngles.z) * Vector2.up * 5f; atb.AddHp(-10, force, playerControll); } } }
public virtual void DamgeAplication(attributes atb, float multiply, Vector2 force) { atb.AddHp((int)(-weaponInfs.GetDamage() * multiply), force, ownerAtb.GetActions().GetPlayerControll()); }