// Use this for initialization void Start() { player = FindObjectOfType <player2d> (); }
// Use this for initialization void Start() { player = GetComponentInParent <player2d>(); rb2d = GetComponentInParent <Rigidbody2D>(); }