void Awake() { Attack = 1; Defense = 0; Health = 100; player = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerController>(); healthBar = GetComponent<ENPCHealthBar> (); am = GameObject.FindGameObjectWithTag("AudioManager").GetComponent<AudioManager>(); _rigidBody = GetComponent<Rigidbody2D> (); canMove = true; }
public void OnEnable() { _healthBar = target as ENPCHealthBar; }