Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Enemy: Monobehaviour
- {
- public Transform player;
- public float speedMove = 10;
- void Update ()
- {
- transform.position = Vector2.MoveTowards (transform.position, player.position, speedMove * Time.deltaTime);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement