public OnCollisionEnter ( Collision other ) : void | ||
other | Collision | |
Результат | void |
public void OnCollisionEnter(Collision other)
{
if (other.gameObject.tag == "Fist")
{
this.gameObject.GetComponent<BaseAbility>().KnockBack(formula);
this.gameObject.GetComponent<BaseAbility>().TakeDamage(damage);
}
}