示例#1
0
 // Use this for initialization
 void Start()
 {
     animator      = GetComponent <Animator>();
     rgbd2d        = GetComponent <Rigidbody2D>();
     sr            = GetComponent <SpriteRenderer>();
     AudioSource   = GameObject.FindGameObjectWithTag("AudioSource");
     musicControll = AudioSource.GetComponent <MusicControll>();
     //bc2d = GetComponent<BoxCollider2D>();
 }
示例#2
0
 void Start()
 {
     Stick           = GameObject.Find("StickParent").gameObject;
     Player          = GameObject.Find("Player").gameObject;
     Eyes            = GameObject.Find("Eyes").gameObject;
     Ground          = GameObject.Find("FirstGround").gameObject;
     PlayerRigidbody = Player.GetComponent <Rigidbody>();
     scoreUI         = gameObject.GetComponent <ScoreUI>();
     MusicManager    = Eyes.GetComponent <MusicControll>();
 }
示例#3
0
 void Start()
 {
     musicControll = this;
 }