public void RegisterHit(GameObject otherObj) { Debug.Log("Collision: " + this + " " + otherObj); if (m_currentAttack != null) { m_currentAttack.OnHitConfirm(otherObj); } }
public void RegisterHit(GameObject otherObj, Hitbox hb, HitResult hr) { //Debug.Log ("Collision: " + this + " " + otherObj); ExecuteEvents.Execute <ICustomMessageTarget> (gameObject, null, (x, y) => x.OnHitConfirm(hb, otherObj, hr)); //Debug.Log ("Registering hit with: " + otherObj); if (m_currentAttack != null) { m_currentAttack.OnHitConfirm(otherObj, hb, hr); } }
public void RegisterHit(GameObject otherObj, HitInfo hi, HitResult hr) { //Debug.Log ("Collision: " + this + " " + otherObj); ExecuteEvents.Execute <ICustomMessageTarget> (gameObject, null, (x, y) => x.OnHitConfirm(hi, otherObj, hr)); //Debug.Log ("Registering hit with: " + otherObj); if (otherObj.GetComponent <Attackable> () != null) { m_hitTargets [otherObj.GetComponent <Attackable> ()] = hi; } if (m_currentAttack != null) { m_currentAttack.OnHitConfirm(otherObj, hi, hr); } }