Example #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();
        }
    }
Example #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
    }
Example #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>();
    }
Example #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
    }
Example #5
0
    void Start()
    {
        //puntuacion
        obPuntaje = GameObject.FindGameObjectWithTag("GameManager");
        puntaje   = obPuntaje.GetComponent <puntuacion>();
        upgradePunto.SetActive(false);

        //sonido
        disparoSound = disparo.GetComponent <AudioSource>();
    }
Example #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();
        }
    }
Example #7
0
    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>();
    }
Example #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();
        }
    }
Example #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>();
    }
Example #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();
    }
Example #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();
    }
Example #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>();
    }
Example #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
    }
Example #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
    }
Example #16
0
 // Use this for initialization
 void Start()
 {
     _score = GameObject.FindObjectOfType <puntuacion>();
 }
Example #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);
 }
Example #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();

        }
    }