using System;
using UnityEngine;

namespace Nan.Scripts
 {
    public class Bullet1Move : MonoBehaviour
    {
        public PlayerControl Player { get; set; }
        public float EnemyMoveSpeed
        {
            get { return 5 + ScoreManager.Instance.CurrentLayer; }
        }


        private void Update()
        {
            var vectorToPlayer = Player.transform.position - transform.position;
            GetComponent<Rigidbody2D>().velocity = EnemyMoveSpeed * vectorToPlayer.normalized;

        }

    }

}