using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AI;
public class Helper : MonoBehaviour
{
NavMeshAgent navMeshAgent;
Zombie zombie;
Helper helper;
CapsuleCollider capsuleCollider;
Animator animator;
MovementAnimator movementAnimator;
// Start is called before the first frame update
void Start()
{
speed = animator.SetFloat("speed", navMeshAgent.velocity.magnitude).float;
navMeshAgent = GetComponent<NavMeshAgent>();
zombie = FindObjectOfType<Zombie>();
navMeshAgent.updateRotation = false;
capsuleCollider = GetComponent<CapsuleCollider>();
animator = GetComponentInChildren<Animator>();
movementAnimator = GetComponent<MovementAnimator>();
}
// Update is called once per frame
void Update()
{
if (speed == 0) {
zombie = FindObjectOfType<Zombie>();
}
navMeshAgent.SetDestination(zombie.transform.position);
transform.rotation = Quaternion.LookRotation(navMeshAgent.velocity.normalized);
}
}
CS1001: Identifier expected (20,77)
CS1002: ; expected (20,77)
CS1001: Identifier expected (20,80)