public void ShowDefeatPanel() { if (isTutorialScene) { panelTodo.SetActive(false); } PanelBoss.SetActive(false); panelDefeat.SetActive(!panelDefeat.activeInHierarchy); }
public void ActiveFigthingBossUI(EnemyHealthBarScript healthBarScript, string name) { isLastPanelBossActive = true; PanelBoss.SetActive(true); healthBarScript.IsBoss = true; healthBarScript.Txt = healthBarBossText; healthBarScript.fillBar.enabled = false; healthBarScript.FillBarParent.enabled = false; healthBarScript.fillBar = bossFillBar; bossName.text = name; }
public void PauseGame() { if (panelDebug.activeInHierarchy) { panelDebug.SetActive(false); } PlayerScript playerScript; if (gameManagerScript.IsVirtualCamFollowingScientist) { playerScript = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerScript>(); } else { playerScript = GameObject.FindGameObjectWithTag("Robot").GetComponent <PlayerScript>(); } if (!PanelPause.activeInHierarchy) { if (PanelInventory.activeInHierarchy) { PanelInventory.SetActive(false); return; } playerScript.IsAbleToAttack = false; Time.timeScale = 0; PanelBoss.SetActive(false); } else { Time.timeScale = 1; StartCoroutine(AttackBool(playerScript)); panelParameters.SetActive(false); PanelInventory.SetActive(false); if (isLastPanelBossActive) { PanelBoss.SetActive(true); } } PanelPause.SetActive(!PanelPause.activeInHierarchy); }