using System.Collections; using System.Collections.Generic; using UnityEngine; public class Enemy : MonoBehaviour { public float moveSpeed = 0.1f; void FixedUpdate() { if (GameManager.Player == null) { return; } transform.Translate((GameManager.Player.position - transform.position).normalized * moveSpeed); } }