void Start() { zombieHP = GetComponent <ZombieHP>(); zombieState = ZombieState.Idle; animator = GetComponent <Animator>(); navMesh = GetComponent <NavMeshAgent>(); PlayerObject = GameObject.FindWithTag("Player"); hpPlayer = PlayerObject.GetComponent <HpPlayer>(); DoorObject = GameObject.FindWithTag("door"); sceneID = SceneManager.GetActiveScene().buildIndex; }
void Start() { hp = HpPlayer.FindObjectOfType <HpPlayer>(); }
// Start is called before the first frame update void Start() { hpPlayer = GetComponent <HpPlayer>(); camera = GetComponent <Camera>(); }