using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Enemy2 : MonoBehaviour
{
    private int health;
    private Vector3 startPos;
    // Start is called before the first frame update
    void Start()
    {
        health = 3;
        startPos = transform.position;
    }

    // Update is called once per frame
    void Update()
    {
        float y = startPos.y + Mathf.Sin(Time.time * 3) * 2;
        transform.position = new Vector2(startPos.x, y);
    }
}
