예제 #1
0
    //public float velocidadequegira = 0f;
    //private float regulagem = 16f;

    // Use this for initialization
    void Start()
    {
        fundocenario     = GameObject.FindGameObjectWithTag("cano");
        scriptcano       = fundocenario.GetComponent <rodatextue>(); //pega a referencia do scrip que gira a textura do cano
        ObjetoSom        = GameObject.FindGameObjectWithTag("GerenciaSom");
        scriptsom        = ObjetoSom.GetComponent <GerenciadorSons>();
        VidaPlayer       = 100;
        PontuacaoPlayer  = 0;
        render           = GetComponent <Renderer>();
        decaingBlinkTime = timeBetweenBlinks;
    }
예제 #2
0
    // Start is called before the first frame update
    void Start()
    {
        Player          = GameObject.FindGameObjectWithTag("Player");
        ScriptPlayer    = Player.GetComponent <bolagira>();
        Cano            = GameObject.FindGameObjectWithTag("cano");
        ScriptCano      = Cano.GetComponent <rodatextue>();
        Instanciador    = GameObject.FindGameObjectWithTag("InstanciaObj");
        ScriptObstaculo = Instanciador.GetComponent <criaobstaculo>();
        ObjetoScore     = GameObject.FindGameObjectWithTag("scoretag");
        ScriptScore     = ObjetoScore.GetComponent <highscoretable>();
        UiObject        = GameObject.FindGameObjectWithTag("canvas");
        ScriptUI        = UiObject.GetComponent <GerenciadorUI>();

        ads      = GameObject.FindGameObjectWithTag("ADMOB");
        ScriptAD = ads.GetComponent <adMobScript>();
        ScriptAD.RequestInterstitial();

        ScoreUI.gameObject.SetActive(false);


        minutosVelMax              = 3f;
        velocidadeCanoInicial      = 1f;
        velocidadeCanoFinal        = 3.1f;
        instanciarQuadradosInicial = 1f;
        instanciarQuadradosFinal   = 0.3f;
        instanciarParedeInicial    = 4f;
        instanciarParedeFinal      = 1f;
        ScriptCano.speed           = velocidadeCanoInicial;
        ScriptObstaculo.DelayObs1  = instanciarQuadradosInicial;
        ScriptObstaculo.DelayObs2  = instanciarParedeInicial;


        GameOver = false;

        Time.timeScale = 1f;
    }
예제 #3
0
 void Start()
 {
     Corpo        = GetComponent <Rigidbody>();
     fundocenario = GameObject.FindGameObjectWithTag("cano");
     scriptcano   = fundocenario.GetComponent <rodatextue>();
 }