// // Update is called once per frame void Awake() { if (player == null) { player = GameObject.FindGameObjectWithTag("Player"); } ph = player.GetComponent <plearhealth> (); eh.GetComponent <enmyhealth> (); }
private void Awake() { ph = GetComponent <plearhealth>(); // hitpoint = ph.curthealth; maxhitpoint = ph.fulhealth; }