//AudioSource boatSound; // Use this for initialization void Start() { rigid = this.GetComponent <Rigidbody2D>(); collider = this.GetComponent <BoxCollider2D>(); offset = collider.bounds.size.x / 2; heightScript = GetComponent <ChangingHeight> (); letterTray = GetComponent <LetterTray> (); anim = GetComponent <Animator>(); }
// Use this for initialization void Start() { rigid = this.GetComponent <Rigidbody2D>(); collider = this.GetComponent <BoxCollider2D>(); offset = collider.bounds.size.x / 2; heightScript = GetComponent <ChangingHeight> (); letterTray = GetComponent <LetterTray> (); anim = GetComponent <Animator>(); boatSound = GetComponent <AudioSource>(); trayDisplay = GameObject.Find("LetterTray Display").GetComponent <LetterTrayDisplay>(); }