コード例 #1
0
ファイル: CharacterBase.cs プロジェクト: DrDoak/TourismGame
    // MAY NEED TO REFACTOR

    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_currentAction != null)
        {
            m_currentAction.OnHitConfirm(otherObj, hi, hr);
        }
    }