﻿using UnityEngine;
using System.Collections;

public class Enemy8 : MonoBehaviour {

	private float moveSpeed = 2.5f;

	// Use this for initialization
	void Start () {
		GetComponent<Rigidbody> ().freezeRotation = true;
	}

	// Update is called once per frame
	void Update () {
		var MovePoint15 = GameObject.Find("MovePoint15").transform.position;
		var MovePoint16 = GameObject.Find("MovePoint16").transform.position;

		transform.position = Vector3.Lerp (MovePoint15, MovePoint16, Mathf.PingPong(Time.time * moveSpeed, 1f));

	}
}
