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

public class AnimatedHazardSinusoidal : Hazard
{
    public Vector3 MoveDirection;
    public float MoveAmplitude;
    public float MoveFrequency;
    public float offset;

    private float _startTime;

    private void Awake()
    {
        _startTime = Time.time;
    }

    private void Update()
    {
        transform.position += MoveDirection * Time.deltaTime * Mathf.Sin(MoveFrequency * (Time.time - _startTime) + offset) * MoveAmplitude;
    }
}
