//instantiations for script references void Start() { changeBG = GameObject.FindGameObjectWithTag("Background").GetComponent <ChangeBackground> (); player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerControl>(); playerHealth = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerHealth>(); camera = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <CameraControl>(); platforms = GameObject.FindGameObjectWithTag("Ground").GetComponent <SpawnPlatforms>(); birds = GameObject.FindGameObjectWithTag("Bird").GetComponent <BirdAI>(); enemy1 = GameObject.FindGameObjectWithTag("Enemy1").GetComponent <Enemy1AI>(); }
// Use this for initialization void Start() { enemyAI = this.gameObject.AddComponent <Enemy1AI> (); }
void Start() { followingPlayer = false; ai = GetComponent <Enemy1AI>(); }