Example #1
0
 private void RetrieveOrCreatedInGameUI()
 {
     if (!GameObject.FindGameObjectWithTag(inGameUIPrefab.tag))
     {
         Debug.Log("Info: Create InGameUI in the hierarchy");
         _currentInGameUI = Instantiate(inGameUIPrefab);
     }
     else
     {
         _currentInGameUI = GameObject.FindGameObjectWithTag(inGameUIPrefab.tag);
     }
     _InGameUIScript = _currentInGameUI.GetComponent <ManagerUI_HUD>();
 }
Example #2
0
 void Awake()
 {
     instance = this;
     //playerController = GameObject.FindGameObjectWithTag("Player");
     playerController.OnDamage.AddListener(healthBar.SetCurrentValue);
 }