// Use this for initialization
 void Start()
 {
     head           = GameObject.FindGameObjectWithTag("EnemyBoss").GetComponent <greenBossCollision>();
     playerScript   = GameObject.FindWithTag("Player").GetComponent <MoveAround>();
     enemiesAlive   = GameObject.FindGameObjectWithTag("Manager").GetComponent <roundsAndEnemyManager>();
     health         = GameObject.FindGameObjectWithTag("greenEnemyHealth").GetComponent <GreenBossHealth>();
     shuttleControl = GameObject.FindGameObjectWithTag("EnemyBoss").GetComponent <greenBossControl>();
 }
Esempio n. 2
0
    public Transform greenBossTransform;        //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("greenEnemyHealth").GetComponent <GreenBossHealth>();
        enemiesAlive            = GameObject.FindGameObjectWithTag("Manager").GetComponent <roundsAndEnemyManager>();
        enemiesAlive.aliveCount = 1;
        BLM = GameObject.FindGameObjectWithTag("mainFloor").GetComponent <BonusLevelManager>();
        health.background.guiTexture.enabled = true;
        GO = GameObject.FindGameObjectWithTag("Manager").GetComponent <GameOver>();
        //shuttleControl = gameObject.GetComponent<greenBossControl>();
        greenBossTransform = GameObject.FindGameObjectWithTag("GreenBoss").transform;
    }
Esempio n. 3
0
 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("greenEnemyHealth").GetComponent <GreenBossHealth>();
     gt                       = health.GetComponent(typeof(GUITexture)) as GUITexture;
     gt.enabled               = true;
     healthBackground         = GameObject.FindGameObjectWithTag("greenEnemyHealthBack").GetComponent(typeof(GUITexture)) as GUITexture;
     healthBackground.enabled = true;
 }