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

public class WaterLevel : MonoBehaviour {

    public Tile tile;
    public float[] heightPerHumidity;
    int _displayHumidity;

	void Start () {
        transform.localPosition = new Vector3(0, heightPerHumidity[tile.humidity], 0);
        if (!tile.isPlayerTile) enabled = false;
	}

    private void Update()
    {
        if (tile.humidity != _displayHumidity)
        {
            _displayHumidity = tile.humidity;
            transform.localPosition = new Vector3(0, heightPerHumidity[_displayHumidity], 0);
        }
	}
}
