//initialise scripts into variables void Start() { es = GetComponent <EnemyStats> (); eod = GetComponent <EffectOnDeath> (); an = GetComponent <Animator> (); shot = GetComponentInChildren <ParticleSystem> (); tc = GameObject.FindGameObjectWithTag("GameController").GetComponent <TextController> (); }
//initialise scripts into variables void Start() { es = GetComponent <EnemyStats> (); eod = GetComponent <EffectOnDeath> (); rb = GetComponent <Rigidbody> (); shot = GetComponentInChildren <ParticleSystem> (); tc = GameObject.FindGameObjectWithTag("GameController").GetComponent <TextController> (); //set velocity based on inputted speed rb.velocity = transform.forward * es.speed; }
private bool dead = false; //if the missile is dead //initialisation void Start() { eod = GetComponent <EffectOnDeath> (); es = GetComponent <EnemyStats> (); target = GameObject.FindGameObjectWithTag("Player"); rb = GetComponent <Rigidbody> (); tc = GameObject.FindGameObjectWithTag("GameController").GetComponent <TextController> (); rb.velocity = initialVelocity; currentVelocity = rb.velocity; }
//initialise scripts and variables void Start() { an = GetComponent <Animator> (); bs = GetComponent <BossStats> (); eod = GetComponent <EffectOnDeath> (); spawn = GameObject.Find("Projectiles"); //start firing only if the player is alive if (player = GameObject.FindGameObjectWithTag("Player")) { StartCoroutine(BossAttacks()); } //initialise health bar bs.health = bs.maxHealth; healthBar = GameObject.Find("Boss Health Bar").GetComponent <Slider>(); healthBar.value = bs.health; }
//play the intro animation, assign scripts to variables void Start() { clip.Play(); bs = GetComponent <BossStats> (); bm = GetComponent <Boss1Movement> (); eod = GetComponent <EffectOnDeath> (); gc = GameObject.Find("Game Controller").GetComponent <GameController> (); //begin coroutines if the player is alive if (player = GameObject.FindGameObjectWithTag("Player")) { StartCoroutine(AimTurrets()); StartCoroutine(BossAttacks()); StartCoroutine(bm.Hover()); } //initialise the health bar bs.health = bs.maxHealth; healthBar = GameObject.Find("Boss Health Bar").GetComponent <Slider>(); healthBar.value = bs.health; }
//initialisation void Start() { eod = GetComponent <EffectOnDeath> (); es = GetComponent <EnemyStats> (); tc = GameObject.FindGameObjectWithTag("GameController").GetComponent <TextController> (); }