void Awake() { GameObject GC = GameObject.FindGameObjectWithTag("GameController"); boltPool = GC.GetComponent <EnemyBoltPool>(); control = GC.GetComponent <GameController>(); rb = GetComponent <Rigidbody>(); }
// 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>(); }