Exemple #1
0
 void Awake()
 {
     instance = this;
 }
Exemple #2
0
 void Awake()
 {
     instance = this;                                                                                     //when game starts, this is stored into the instance which will return the health
 }
Exemple #3
0
 private void Awake()
 {
     instance = this;
 }
Exemple #4
0
 protected void Start()
 {
     healthBar = GetComponentInChildren <UIHealthBar>();
     InitializeHealthBar();
 }
Exemple #5
0
 void Awake()
 {
     uiHealthBar = HealthBar.GetComponent <UIHealthBar>();
     DisableUnitUI();
 }
Exemple #6
0
 void Awake()
 {
     instance     = this;
     originalSize = mask.rectTransform.rect.width;
 }
 // Use this for initialization
 void Awake()
 {
     Instance = this;
 }
 private void Awake() //It's called when the object is created, in this case when the game starts
 {
     healtBar = this; //this = Special C# keyword that means "the object that currently runs that function"
 }
 private void Start()
 {
     mHealth = gameObject.GetComponent <UIHealthBar>();       // Get the Health Script
     mHealth.DestroyGameObject += DestroyGameObject;          // Attach the Function
 }
Exemple #10
0
 private void Awake()
 {
     // 创建单例
     instance = this;
 }
    float originalSize; //Set size

    void Awake()
    {
        instance = this; //Set the instance to this gameobject
    }
Exemple #12
0
 void Awake()
 {
     _healthBar = GetComponentInChildren <UIHealthBar>();
 }