Esempio n. 1
0
 void Awake()
 {
     //xScale = transform.localScale.x;
     bossSeen = false;
     cam      = Camera.main.gameObject.GetComponent <CamShake2>();
     //alive = true;
     currentHealth = maxHealth;
     alpha         = this.gameObject.GetComponent <SpriteRenderer>().color;
     healthBar     = healthCanvas.transform.GetChild(2).gameObject;
     fillHp        = healthBar.GetComponent <Image>();
     animate       = this.gameObject.GetComponent <Animator>();
     flipper       = this.gameObject.GetComponent <SpriteRenderer>();
     grunt         = this.gameObject.GetComponent <AudioSource>();
 }
Esempio n. 2
0
 void Awake()
 {
     bulletCount   = 0;
     audioS        = GetComponent <AudioSource>();
     cam           = Camera.main.gameObject.GetComponent <CamShake2>();
     _player       = GetComponent <Rigidbody2D>();
     _hitCountText = hitCountGO.GetComponent <Text>();
     _hitCount     = 0;
     updateHitCount();
     _shotType         = "";
     animateController = GetComponentInChildren <Animator>();
     flipper           = this.gameObject.transform.GetChild(0).GetComponent <SpriteRenderer>();
     hit     = false;
     shineGO = currentPower.transform.GetChild(0).gameObject;
 }