void OnEnable() { bFeet = GetComponentInChildren <BatFeet> (); bRigidBody = GetComponent <Rigidbody2D> (); bAnimator = GetComponent <Animator> (); bRenderer = GetComponent <SpriteRenderer> (); bGrapple = GetComponent <BatGrapple>(); bInput = GetComponent <BatInput> (); }
// Use this for initialization void Start() { this.bat = GameObject.FindObjectOfType <BatInput>(); this.paddleToBallVector = this.transform.position - bat.transform.position; }