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

public class WavesController : MonoBehaviour {

    public float speed;
    public float tileSize;
    private Vector3 startPosition;

	// Use this for initialization
	void Start () {
        startPosition = transform.position;
	}
	
	// Update is called once per frame
	void Update () {
        float newPosition = Mathf.Repeat(speed * Time.time, tileSize * transform.localScale.x);
        transform.position = startPosition + Vector3.left * newPosition;
    }
}
