//Resets the hp of the boss private void ResetHealth(StateController controller) { if (triggered == false) { triggered = true; TrudgesHealthBar hpBar = controller.GetComponentInChildren <TrudgesHealthBar>(); if (hpBar != null) { hpBar.ResetBar(); } } }
// Use this for initialization void Start() { //sets the amount of time it takes to pick up an item timer = new Timer(pickupTimeInSeconds, 0); //Finds the player player = GameObject.FindGameObjectWithTag(playerTag); playerAnim = player.GetComponent <PlayerAnimationController>(); ownAnim = GetComponent <Animator>(); //Finds pointsystem pointSystem = GameObject.FindGameObjectWithTag("PointSystem").GetComponent <PointSystem>(); //finds audioSource audioSource = GameObject.FindGameObjectWithTag("AudioSource").transform.Find(audioSourceChildNamePickup).GetComponent <AudioSource>(); //Gets the bosses healthbar trudgesHealthBar = GameObject.FindGameObjectWithTag("Boss").GetComponentInChildren <TrudgesHealthBar>(); }