Exemplo n.º 1
0
 void Awake()
 {
     cRigid   = GetComponent <Rigidbody>();
     cAcc     = GetComponent <PRAC_AI_Acc>();
     cCatcher = GetComponent <AI_CatchHandling>();
     cAud     = GetComponentInChildren <AD_Athletes>();
     mState   = PRAC_ATH_STATE.SPRE_SNAP;
 }
Exemplo n.º 2
0
    public void FENTER_Tackled()
    {
        mState             = PRAC_ATH_STATE.STACKLED;
        cRigid.constraints = RigidbodyConstraints.None;
        cRigid.velocity    = Vector3.up * 10f;

        // if we have the ball, then we drop the ball.
        if (mHasBall)
        {
            if (cCatcher.mState != AI_CatchHandling.STATE.S_CONTROLLED)
            {
                Debug.Log("They jarred the ball loose from me");
                mHasBall        = false;
                cCatcher.mState = AI_CatchHandling.STATE.S_NOCATCH;
                TDC_EventManager.FBroadcast(TDC_GE.GE_BallDropped);
            }
        }
    }