示例#1
0
    void Awake()
    {
        GameObject GC = GameObject.FindGameObjectWithTag("GameController");

        boltPool = GC.GetComponent <EnemyBoltPool>();
        control  = GC.GetComponent <GameController>();
        rb       = GetComponent <Rigidbody>();
    }
示例#2
0
 // Use this for initialization
 void Awake()
 {
     rb           = GetComponent <Rigidbody>();
     soundControl = GameObject.FindGameObjectWithTag("SoundController").
                    GetComponent <SoundController>();
     boltPool = GameObject.FindGameObjectWithTag("BossPool").
                GetComponent <EnemyBoltPool>();
     control = GameObject.FindGameObjectWithTag("GameController").
               GetComponent <GameController>();
 }