public void setBossHp() { boss = this.GetComponent<EnemyGeneralBehaviour> (); defaultHp = boss.hp; currWidth = 0; backBar.sizeDelta = new Vector2(defaultWidth, backBar.sizeDelta.y); frontBar.sizeDelta = new Vector2(currWidth, frontBar.sizeDelta.y); fillLerp = true; }
// Use this for initialization void Start() { speed = 4; initialPos = transform.position; playerObj = GameObject.Find("player").transform; bossGeneral = GetComponent<EnemyGeneralBehaviour> (); attackControl = GetComponent<patternList> (); getPlayer = playerObj.GetComponent<PlayerController> (); GetComponent<bossHealthbar> ().setBossHp (); secretbossController = this.GetComponent<Animator> (); getLevel = GameObject.Find("LevelLoader").GetComponent<LevelLoader> (); bossState = state.state_idle; foreach (Transform child in transform) { switch (child.name) { case "minionParent" : minionParent = child.gameObject; break; case "iceChunkParent" : iceChunkParent = child.gameObject; break; case "lsdTurretParent" : lsdTurretParent = child.gameObject; break; case "ecsCloneParent" : ecsCloneParent = child.gameObject; break; case "iceAnim" : iceAnim = child.gameObject; break; case "aoeAnim" : homingAnim = child.gameObject; break; case "defaultAnim" : defaultAnim = child.gameObject; break; } } }
// Use this for initialization void Start() { //cloneDir = direction.down; //cloneState = state.idle; cloneRef = GetComponent<EnemyGeneralBehaviour> (); }
void Start() { inhState = state.state_idle; /*foreach (Transform child in transform) { if(child.name == "(L)ConjoinedMinion") LeftMinion = child; if(child.name == "(R)ConjoinedMinion") RightMinion = child; }*/ LeftMinion = transform.FindChild ("(L)ConjoinedMinion"); RightMinion = transform.FindChild ("(R)ConjoinedMinion"); inhController = GetComponent<Animator>(); inhPatternList = GetComponent<patternList> (); inhHealth = this.GetComponent<EnemyGeneralBehaviour> (); GetComponent<bossHealthbar> ().setBossHp (); }
// Use this for initialization void Start() { //minionPrefab = new GameObject[3]; maxWave = 3; speed = 3; //for(int i=0; i< minionPattern.Length; i++) { // minionPattern[i].transform.position = new Vector3 (0, 2, 1); //} minionInitPos = new Vector3 (0, 2, 0); retractPos = new Vector3 (transform.position.x, 6, 0); initPos = transform.position; ecsState = state.state_idle; ecsRef = this.GetComponent<EnemyGeneralBehaviour> (); ecsController = GetComponent<Animator>(); ecsAttackControl = GetComponent <patternList> (); GetComponent<bossHealthbar> ().setBossHp (); }