Beispiel #1
0
 void Awake()
 {
     _instance = this;
     sprite    = this.GetComponent <UISprite> ();
     //this.gameObject.SetActive (false);
     sprite.alpha = 0;
 }
Beispiel #2
0
    void Awake()
    {
        instance = this;

        sprite = GetComponent<UISprite>();
        sprite.alpha = 0;
    }
Beispiel #3
0
    void Awake()
    {
        _instance = this;
        sprite    = this.GetComponent <UISprite>();
        //this.gameObject.SetActive(false);
        sprite.alpha = 0;

        hpLabel   = transform.Find("hpLabel").GetComponent <UILabel>();
        harmLabel = transform.Find("harmLabel").GetComponent <UILabel>();
    }
Beispiel #4
0
 void Awake()
 {
     //单例模式,其他类可以方便使用该类的方法
     _instance = this;
     sprite    = this.GetComponent <UISprite>();
     //
     //this.gameObject.SetActive(false);
     sprite.alpha = 0;
     hpLabel      = this.transform.Find("hp_label").GetComponent <UILabel>();
     attackLabel  = this.transform.Find("attack_label").GetComponent <UILabel>();
     destroylabel = this.transform.Find("destroylabel").GetComponent <UILabel>();
 }
Beispiel #5
0
 void Awake()
 {
     _instance = this;
     sprite = this.GetComponent<UISprite>();
     //this.gameObject.SetActive(false);
     sprite.alpha = 0;
     hpLabel = this.transform.Find("hpLabel").GetComponent<UILabel>();
     harmLabel = this.transform.Find("harmLabel").GetComponent<UILabel>();
     if (harmLabel == null)
     {
         Debug.Log("null");
     }
 }
Beispiel #6
0
 private void Awake()
 {
     _instance = this;
     this.gameObject.SetActive(false);
 }