示例#1
0
    //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>();
    }
示例#2
0
 // 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>();
 }