示例#1
0
 private void OnTriggerExit(Collider other)
 {
     if (other.CompareTag("Player"))
     {
         BossUI.SetActive(false);
     }
 }
示例#2
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.CompareTag("Player") && bossDamageable.Health > 0)
     {
         BossUI.SetActive(true);
     }
 }
示例#3
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
示例#4
0
    public static void Update(MenuState newState)
    {
        state = newState;
        switch (state)
        {
        case MenuState.MainMenu:
            MainUI.SetActive(false);
            BossUI.SetActive(false);
            DeathUI.SetActive(false);
            PauseMenu.SetActive(false);
            TitleScreen.SetActive(true);
            break;

        case MenuState.Paused:
            PauseMenu.SetActive(true);
            break;

        case MenuState.Dead:
            MainUI.SetActive(false);
            BossUI.SetActive(false);
            PauseMenu.SetActive(false);
            TitleScreen.SetActive(false);
            DeathUI.SetActive(true);
            break;

        case MenuState.Playing:
            PauseMenu.SetActive(false);
            TitleScreen.SetActive(false);
            DeathUI.SetActive(false);
            MainUI.SetActive(true);
            break;
        }
    }
示例#5
0
    private void Start()
    {
        BUI = FindObjectOfType <BossUI>();
        BUI.TurnOn();

        BHB = BUI.gameObject.GetComponentInChildren <HealthBar>();
        BHB.MaxHealthPoints = maxHealth;
        Intro();
    }
示例#6
0
 private void OnTriggerStay(Collider other)
 {
     if (other.CompareTag("Player"))
     {
         if (bossDamageable.Health > 0)
         {
             BossUI.UpdateHealth((float)bossDamageable.Health / bossDamageable.MaxHealth);
         }
         else
         {
             BossUI.SetActive(false);
         }
     }
 }
示例#7
0
 void Awake()
 {
     instance = this;
 }