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

public class OceanWaves : MonoBehaviour {

    public float CurveSpeed;
    public float WaveAggression;
    public bool Foreground;

    float fTime = 0;
	// Use this for initialization
	void Start () {
	}
	
	// Update is called once per frame
	void Update () 
    {
        fTime += Time.deltaTime * CurveSpeed;

        Vector3 vSin = new Vector3(Foreground ? 0 : Mathf.Sin(fTime) * WaveAggression, Foreground ? Mathf.Sin(fTime) * WaveAggression : 0, 0);
        transform.position += vSin * Time.deltaTime;


        //transform.position = new Vector3(transform.position.x * Mathf.Sin(fTime), transform.position.y, transform.position.z);
	}
}
