123456789101112131415161718 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class enemyHealthBar : MonoBehaviour
- {
- public enemyScript enemy;
-
- float timer=0;
- void Update()
- {
- if(timer >=0){ timer -= Time.deltaTime; return;}
- timer = 0.5f;
- enemy.healthBar.SetHealth(enemy.health, enemy.maxHealth);
- }
- }
|