//Use this for initialization void Start() { //Set thhe public vars vForce.y = force; vJump.y = jump; //get script de puntuacion puntuacionScript = objetoPuntuacion.GetComponent <puntuacion>(); //Set all audio sources AudioSource[] allMyAudioSources = GetComponents <AudioSource>(); bloob = allMyAudioSources[0]; peow = allMyAudioSources[1]; pipe = allMyAudioSources[2]; boup = allMyAudioSources[3]; print(Application.loadedLevelName); //Set state according scene if (Application.loadedLevelName == "Final") { birdState = states[3]; } else { //Set bird setBirdToNormal(); } }
//public bool arranca = false; **********************************1 comento // Use this for initialization void Start() { //get script de puntuacion puntuacionScript = objetoPuntuacion.GetComponent <puntuacion>(); vSpeed.x = speed; vDistance.x = distance; //Time.timeScale = 0; ***********************************2 comento }
// Start is called before the first frame update void Start() { rigid = GetComponent <Rigidbody>(); rigid.AddForce(transform.forward * fuerza, ForceMode.Impulse); //puntaje gameManagerObject = GameObject.FindGameObjectWithTag("GameManager"); puntuacionScript = gameManagerObject.GetComponent <puntuacion>(); }
//public bool arranca = false; **********************************1 comento // Use this for initialization void Start() { //get script de puntuacion puntuacionScript = objetoPuntuacion.GetComponent<puntuacion>(); vSpeed.x = speed; vDistance.x = distance; //Time.timeScale = 0; ***********************************2 comento }
void Start() { //puntuacion obPuntaje = GameObject.FindGameObjectWithTag("GameManager"); puntaje = obPuntaje.GetComponent <puntuacion>(); upgradePunto.SetActive(false); //sonido disparoSound = disparo.GetComponent <AudioSource>(); }
//puntuacion para cada nave asignando etiquetas /* public void SetPuntuacion() * { * * _incr = _incr + _scores; * text.text = highScore.ToString().PadLeft(9, '0'); * * * }*/ void Update() { if (_incr > highScore) { puntuacion variable = GetComponent <puntuacion>(); _incr = variable._incremento; PlayerPrefs.SetInt(scoreKey, (int)_incr); PlayerPrefs.Save(); } }
void Start() { obAgregar = GameObject.FindGameObjectWithTag("GameManager"); agregar = obAgregar.GetComponent <puntuacion>(); ganaste = obAgregar.GetComponent <mostrarPantallaTxt>(); //vida vida = obAgregar.GetComponent <vidaActual>(); }
void Start() { //puntuacion obPuntaje = GameObject.FindGameObjectWithTag("GameManager"); puntaje = obPuntaje.GetComponent <puntuacion>(); //render prefabBala = GameObject.FindGameObjectWithTag("prefabBala"); //render = GetComponent<Renderer>(); render = prefabBala.GetComponent <Renderer>(); }
//puntuacion para cada nave asignando etiquetas void Update() { text.text = highScore.ToString().PadLeft(9, '0'); datos = GameObject.Find("scores").GetComponent <puntuacion>(); _incr = datos._incremento; if ((int)_incr > highScore) { PlayerPrefs.SetInt(scoreKey, (int)_incr); PlayerPrefs.Save(); } }
void Start() { Nisty = GameObject.FindGameObjectWithTag("nisty"); //vida gameObVida = GameObject.FindGameObjectWithTag("GameManager"); vida = gameObVida.GetComponent <vidaActual>(); //puntuacion gameObPuntuacion = GameObject.FindGameObjectWithTag("GameManager"); puntaje = gameObPuntuacion.GetComponent <puntuacion>(); // asdfg gameOver = gameObPuntuacion.GetComponent <mostrarPantallaTxt>(); }
void Awake() { if(instanciaPuntuacion == null){ instanciaPuntuacion = this; DontDestroyOnLoad(gameObject); } else if(instanciaPuntuacion != this){ Destroy(gameObject); } //Seteo el score actual myTextgameObject = GameObject.Find("Score"); myTextgameObject.GetComponent<TextMesh>().text = punt.ToString(); }
void Awake() { if (instanciaPuntuacion == null) { instanciaPuntuacion = this; DontDestroyOnLoad(gameObject); } else if (instanciaPuntuacion != this) { Destroy(gameObject); } //Seteo el score actual myTextgameObject = GameObject.Find("Score"); myTextgameObject.GetComponent <TextMesh>().text = punt.ToString(); }
void Start() { // rigid de la bala rg = GetComponent <Rigidbody>(); rg.AddForce(transform.forward * fuerza, ForceMode.Impulse); //Buscar objetos nisty = GameObject.FindGameObjectWithTag("nisty"); xpositivo = GameObject.FindGameObjectWithTag("xPositivo"); xnegativo = GameObject.FindGameObjectWithTag("xNegativo"); gmObEnemigo = GameObject.FindGameObjectWithTag("enemigo"); enemigoComp = gmObEnemigo.GetComponent <enemigoMov>(); //puntuacion obPuntaje = GameObject.FindGameObjectWithTag("GameManager"); puntaje = obPuntaje.GetComponent <puntuacion>(); }
// Use this for initialization void Start() { //get script de puntuacion puntuacionScript = objetoPuntuacion.GetComponent <puntuacion>(); Time.timeScale = 0; repositionPlace.x = 9.30f; repositionPlace.y = transform.position.y; repositionPlace.z = transform.position.z; movement.y = 3.35f; rotation = Mathf.Lerp(0, -7, 5); attackMovement.x = -9f; //Set all audio sources AudioSource[] allMyAudioSources = GetComponents <AudioSource>(); peow = allMyAudioSources[0]; //seteo al bird en estado Killer //Cri cri }
// Use this for initialization void Start() { //get script de puntuacion puntuacionScript = objetoPuntuacion.GetComponent<puntuacion>(); Time.timeScale = 0; repositionPlace.x = 9.30f; repositionPlace.y = transform.position.y; repositionPlace.z = transform.position.z; movement.y = 3.35f; rotation = Mathf.Lerp (0, -7, 5); attackMovement.x = -9f; //Set all audio sources AudioSource[] allMyAudioSources = GetComponents<AudioSource>(); peow = allMyAudioSources[0]; //seteo al bird en estado Killer //Cri cri }
// Use this for initialization void Start() { _score = GameObject.FindObjectOfType <puntuacion>(); }
// Use this for initialization void Start() { _score = GameObject.FindObjectOfType <puntuacion>(); _laserContainer = GameObject.FindObjectOfType <rec_ST>(); //transform.localRotation = new Quaternion(0.0f, 1.0f, 0.0f, -90.0f); }
//Use this for initialization void Start() { //Set thhe public vars vForce.y = force; vJump.y = jump; //get script de puntuacion puntuacionScript = objetoPuntuacion.GetComponent<puntuacion>(); //Set all audio sources AudioSource[] allMyAudioSources = GetComponents<AudioSource>(); bloob = allMyAudioSources[0]; peow = allMyAudioSources[1]; pipe = allMyAudioSources[2]; boup = allMyAudioSources[3]; print (Application.loadedLevelName); //Set state according scene if (Application.loadedLevelName == "Final") { birdState = states[3]; } else { //Set bird setBirdToNormal(); } }