Beispiel #1
0
 private void Start()
 {
     player       = FindObjectOfType <PlayerController>();
     healthKit    = FindObjectOfType <PlayerHealthKitController>();
     healthBarUI  = FindObjectOfType <PlayerHealthBar>();
     healthKitBar = FindObjectOfType <PlayerHealthKitBar>();
 }
Beispiel #2
0
    private void Start()
    {
        healthKit       = FindObjectOfType <PlayerHealthKitController>();
        healthKitSlider = GetComponent <Slider>();

        //Sets the max  value and current value of player health kit
        healthKitSlider.maxValue = healthKit.MAXHealthKitValue;
        healthKitSlider.value    = healthKit.CurrentHealthKitValue;
    }