Beispiel #1
0
 void GetComponents()
 {
     kidUnit         = GetComponent <KidUnit>();
     kidNetworker    = GetComponent <KidNetworker>();
     networkIdentity = GetComponent <NetworkIdentity>();
     kidInput        = GetComponent <InputManager>();
     rigidbody       = GetComponent <Rigidbody>();
 }
    public void RpcGrab(GameObject grabber)
    {
        //print("Grab()");
        if (ballState != BallState.Free)
        {
            return;
        }

        myCarrier = grabber.GetComponent <KidUnit>();
        myCarrier.RpcAcceptBallGrab();

        rigidbody.velocity   = Vector3.zero;
        rigidbody.useGravity = false;
        collider.enabled     = false;
        ballState            = BallState.Carried;
    }