private void Awake() { if (instance == null) { instance = this; } else { Destroy(this); } }
public void Start() { health = maxHealth; weaponCol = GameObject.FindGameObjectWithTag("Point").GetComponent <WeaponCol>(); ShowDataHudOBJ = GameObject.Find("ShowDataHud"); showDataHUD = ShowDataHudOBJ.GetComponent <ShowDataHUD>(); thisCollider = gameObject.GetComponent <Collider>(); healthBarBG.sizeDelta = new Vector2(health * 2, healthBar.sizeDelta.y); }
void Start() => ShowDataHUD = GameObject.Find("ShowDataHud").GetComponent <ShowDataHUD>();
// Start is called before the first frame update private void Awake() { showDataHUD = GameObject.Find("ShowDataHud").GetComponent <ShowDataHUD>(); }