public Transform blueBossTransform; //current transform data of this enemy - DELETE THIS WHEN HAS REAL MODEL // Use this for initialization void Start() { playerScript = GameObject.FindWithTag("Player").GetComponent <MoveAround>(); //cache transform data for easy access/performance health = GameObject.FindGameObjectWithTag("blueEnemyHealth").GetComponent <BlueBossHealth>(); enemiesAlive = GameObject.FindGameObjectWithTag("Manager").GetComponent <roundsAndEnemyManager>(); BLM = GameObject.FindGameObjectWithTag("mainFloor").GetComponent <BonusLevelManager>(); health.background.guiTexture.enabled = true; GO = GameObject.FindGameObjectWithTag("Manager").GetComponent <GameOver>(); blueBossTransform = GameObject.FindGameObjectWithTag("BlueBoss").transform; }
private void Start() { LookAtTarget = GameObject.FindWithTag("Player").transform; //target the player InvokeRepeating("PickRandomNumber", 1.0f, 1.0f); InvokeRepeating("PickRandomNumber", 1.0f, 3.0f); enemiesAlive = GameObject.FindGameObjectWithTag("Manager").GetComponent <roundsAndEnemyManager>(); enemiesAlive.aliveCount = 1; health = GameObject.FindGameObjectWithTag("blueEnemyHealth").GetComponent <BlueBossHealth>(); gt = health.GetComponent(typeof(GUITexture)) as GUITexture; gt.enabled = true; healthBackground = GameObject.FindGameObjectWithTag("blueEnemyHealthBack").GetComponent(typeof(GUITexture)) as GUITexture; healthBackground.enabled = true; }