using UnityEngine;
using System.Collections;

public class Turtle : MonoBehaviour {

	public bool Down;
	//private float speed = 2;

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
		if (Down) {
			Vector3 downPos = transform.position;
			downPos.y = -0.25f;
			transform.position = Vector3.MoveTowards(transform.position, downPos, 0.3f * Time.deltaTime);
		}
		else {
			Vector3 upPos = transform.position;
			upPos.y = 0;
			transform.position = Vector3.MoveTowards(transform.position, upPos, 2f * Time.deltaTime);
		}
	}
}
