private void Awake() { if (Instance == null) { Instance = this; } }
void Awake() { _instance = this; hpSlider = this.GetComponent <Slider>(); hpText = transform.Find("HpText").GetComponent <Text>(); this.gameObject.SetActive(false); }
private void OnDestroy() { if (Instance != null) { Instance = null; } }
//protected void OnDisable() //{ // DeleteInList(); //} public void SetUiOnOff(bool OnOff) { if (bosshpBar == null) { bosshpBar = BossHpBar.Instance; } if (bosshpBar != null) { bosshpBar.gameObject.SetActive(OnOff); bosshpBar.UpdateBar(1f, 1f); } }
void Awake() { instance = this; hpBar = GetComponent <UISlider>(); hpLabel = transform.Find("hp_label").GetComponent <UILabel>(); }