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

public class WaterController : MonoBehaviour
{
    public float tideSpeed = 1f;
    public float maxLevel = 20f;

    public float WaterLevel {get; set;}

    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        WaterLevel = Mathf.PerlinNoise(Time.time * tideSpeed, 0) * maxLevel;
        transform.position = new Vector3(0, WaterLevel, 0);
    }
}
