Esempio n. 1
0
 public void ResetHealthPool()
 {
     currentHealth = maxHealth;
     linkedDisplay?.UpdateHealth(currentHealth, maxHealth);
     linkedDisplay?.OverrideScale(Vector3.one);
     canDie = true;
 }
    private void Awake()
    {
        GameObject player = GameObject.FindGameObjectWithTag("Player");

        player.GetComponent <Healthpool>().linkedDisplay = uiToLink;
        uiToLink.isUnique = true;
        uiToLink.OverrideScale(Vector3.one);
    }
 private void OnTriggerEnter(Collider other)
 {
     if (other.CompareTag("Player"))
     {
         SingletonMusicPlayer.StaticMusicPlayer.SwapTrack(EMusicState.Boss, false, true);
         trigger.enabled    = false;
         protection.enabled = false;
         bossUI.OverrideScale(Vector3.one);
         AttackBehaviour.cannotAttackOverride = false;
         StartCoroutine(PersistantCanvas.staticCanvas.DisplayBossText(bossIntroName, bossIntroDescription));
         if (childActivation != null)
         {
             childActivation.SetActive(true);
         }
     }
 }