Академический Документы
Профессиональный Документы
Культура Документы
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public float xMin, xMax, zMin, zMax; //valores x&Z max min
//
//
void Start () {
//
void Update(){
//
//
Vector3 vector = new Vector3 (h, 5f, v); //posicion inicial //5f es la altura que elejimos
rb.velocity = vector * 10;//velocidad inicial //aqui ajustamos la velocidad de la nave cambinado el 10
);
while (true){
(Random.Range(-asteroidValues.x, asteroidValues.x),asteroidValues.y,asteroidValues.z);
//aleatorio de -x a +x
void Update () {
GetComponent <Renderer> ().material.mainTextureOffset = new Vector2 (0f, (Time.time * speed)% 1); //0f es X que esta en 0
//mover eje y
}}
void Start () { }
void Update () { }
if(other.name == "Hit"){
return;}
Destroy (gameObject);
}
}
void Start () {
void Update () {
}
}
void Start () {
void Update () {
}
}
ing System.Collections;
using System.Collections.Generic;
using UnityEngine;
Rotate ();
Movement ();
void Rotate () {
if (Input.GetKey (KeyCode.Q))
transform.Rotate (new Vector3 (0f, deltaRotation, 0f) * Time.deltaTime);
if (Input.GetKey (KeyCode.W))
transform.Translate (Vector3.forward * deltaMovement * Time.deltaTime);
sing System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
//contador: 0
void Start () {
btnReinicio.gameObject.SetActive(false); //es un boleano que oculta el boton en el inicio //los boleanos son falso o verdadero
btnSiguiente.gameObject.SetActive(false);////////////////////Adicione boton
void Update () {
Rotate ();
Movement ();
btnReinicio.gameObject.SetActive(true);//mostrar boton
}/*
btnReinicio.gameObject.SetActive(false);//mostrar boton
}*/
if (Input.GetKey (KeyCode.Q))
if (Input.GetKey (KeyCode.W))
//Destroy (obj.gameObject);
}}