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

public class Movimiento : MonoBehaviour {
    public GameObject Nave;
    public GameObject content;
    float px= 0;
    float py= 0.01f;
    public Input instruccion;
    public InputField coordenadas;
    public Camera Cam;
    // Use this for initialization
    void Start () {
		
	}

    // Update is called once per frame
    void Update() {
        content.gameObject.transform.Translate(0, py, 0);
        Cam.transform.position = content.transform.position;
        Cam.transform.rotation = Quaternion.Euler(0, 0, 0);
        // Rotate the object around its local X axis at 1 degree per second


        if (Input.GetKeyDown(KeyCode.Return))
        {
            Debug.Log("Entra");
            switch (coordenadas.text)
            {
                case "1":

                    Nave.transform.rotation = Quaternion.Euler(0, 0, 15f);
                    content.transform.rotation = Quaternion.Euler(0, 0, 50f);
                 

                    break;
                case "8":
                    Nave.transform.rotation = Quaternion.Euler(0, 0, -15f);
                    content.transform.rotation = Quaternion.Euler(0, 0, -50f);
                 

                    break;
            }
        }
        // }
    }


}
