Ejemplo n.º 1
0
    //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();
        }
    }
Ejemplo n.º 2
0
    //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
    }
Ejemplo n.º 3
0
    // 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>();
    }
Ejemplo n.º 4
0
    //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
    }
Ejemplo n.º 5
0
    void Start()
    {
        //puntuacion
        obPuntaje = GameObject.FindGameObjectWithTag("GameManager");
        puntaje   = obPuntaje.GetComponent <puntuacion>();
        upgradePunto.SetActive(false);

        //sonido
        disparoSound = disparo.GetComponent <AudioSource>();
    }
Ejemplo n.º 6
0
    //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();
        }
    }
Ejemplo n.º 7
0
    void Start()
    {
        obAgregar = GameObject.FindGameObjectWithTag("GameManager");
        agregar   = obAgregar.GetComponent <puntuacion>();

        ganaste = obAgregar.GetComponent <mostrarPantallaTxt>();

        //vida
        vida = obAgregar.GetComponent <vidaActual>();
    }
Ejemplo n.º 8
0
    void Start()
    {
        //puntuacion
        obPuntaje = GameObject.FindGameObjectWithTag("GameManager");
        puntaje   = obPuntaje.GetComponent <puntuacion>();

        //render
        prefabBala = GameObject.FindGameObjectWithTag("prefabBala");
        //render = GetComponent<Renderer>();
        render = prefabBala.GetComponent <Renderer>();
    }
Ejemplo n.º 9
0
    //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();
        }
    }
Ejemplo n.º 10
0
    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>();
    }
Ejemplo n.º 11
0
    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();
    }
Ejemplo n.º 12
0
    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();
    }
Ejemplo n.º 13
0
    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>();
    }
Ejemplo n.º 14
0
    // 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
    }
Ejemplo n.º 15
0
    // 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
    }
Ejemplo n.º 16
0
 // Use this for initialization
 void Start()
 {
     _score = GameObject.FindObjectOfType <puntuacion>();
 }
Ejemplo n.º 17
0
 // 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);
 }
Ejemplo n.º 18
0
    //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();

        }
    }