Example #1
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
 }
Example #2
0
 void Awake()
 {
     _instance = this;
     hpSlider  = this.GetComponent <Slider>();
     hpText    = transform.Find("HpText").GetComponent <Text>();
     this.gameObject.SetActive(false);
 }
Example #3
0
 private void OnDestroy()
 {
     if (Instance != null)
     {
         Instance = null;
     }
 }
Example #4
0
    //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);
        }
    }
Example #5
0
 void Awake()
 {
     instance = this;
     hpBar    = GetComponent <UISlider>();
     hpLabel  = transform.Find("hp_label").GetComponent <UILabel>();
 }