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

public class player : MonoBehaviour {
	private Vector3 offset;

	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
		if(Input.acceleration.x<5 && Input.acceleration.x>0 ){
			transform.Translate(Input.acceleration.x,0.1f,0);
		}else if(Input.acceleration.x<0 && Input.acceleration.x>-5){
			transform.Translate(Input.acceleration.x,0.1f,0);
		}else{
			transform.Translate(0,0.1f,0);
		}
		
		transform.Translate(new Vector3(0.4f, 0,0.2f));


	}

	/*void OnTriggerEnter(Collider obj){
		if(obj.tag == "lava"){			
			Destroy(obj.gameObject);
		}
	}*/
}
